From 87e7050bff564820e3337c0653211a8180ef1fc0 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Fri, 5 Jun 2009 11:41:51 +0000 Subject: die() does never return. Annotate it as such. Any endless loop after die() can be eliminated. Dereferencing a NULL pointer is bad. die() instead. Replace endless loops with die(). Signed-off-by: Carl-Daniel Hailfinger Acked-by: Peter Stuge git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4340 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/devices/pci_ops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/devices/pci_ops.c') diff --git a/src/devices/pci_ops.c b/src/devices/pci_ops.c index 08792f209d..ed984f89bd 100644 --- a/src/devices/pci_ops.c +++ b/src/devices/pci_ops.c @@ -30,7 +30,7 @@ static struct bus *get_pbus(device_t dev) struct bus *pbus; if (!dev) - printk_alert("get_pbus: dev is NULL!\n"); + die("get_pbus: dev is NULL!\n"); pbus = dev->bus; @@ -44,9 +44,8 @@ static struct bus *get_pbus(device_t dev) pbus = pbus->dev->bus; } if (!pbus || !pbus->dev || !pbus->dev->ops || !pbus->dev->ops->ops_pci_bus) { - printk_alert("%s Cannot find pci bus operations", dev_path(dev)); + printk_emerg("%s Cannot find pci bus operations\n", dev_path(dev)); die(""); - for(;;); } return pbus; } -- cgit v1.2.3