[coreboot] [PATCH] v3: Fix one NULL pointer dereference, add code to debug another one.
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Tue Mar 4 23:27:38 CET 2008
Fix one NULL pointer dereference, add code to debug another one.
Don't commit yet, I'd rather apply a fix for the NULL pointer
than just debugging it.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Index: device/device.c
===================================================================
--- device/device.c (Revision 630)
+++ device/device.c (Arbeitskopie)
@@ -277,8 +277,9 @@
{
struct device *curdev;
- printk(BIOS_SPEW, "%s: %s(%s) read_resources bus %d link: %d\n",
- __func__, bus->dev->dtsname, dev_path(bus->dev),
+ printk(BIOS_SPEW, "%s: bus->dev %p, bus->dev->dtsname %p, %s(%s) read_resources bus %d link: %d\n",
+ __func__, bus->dev, bus->dev->dtsname,
+ bus->dev->dtsname, dev_path(bus->dev),
bus->secondary, bus->link);
/* Walk through all devices and find which resources they need. */
Index: device/pci_device.c
===================================================================
--- device/pci_device.c (Revision 630)
+++ device/pci_device.c (Arbeitskopie)
@@ -1101,7 +1101,7 @@
dev = pci_probe_dev(dev, bus, devfn);
printk(BIOS_SPEW,
"PCI: pci_scan_bus pci_probe_dev returns dev %p(%s)\n",
- dev, dev->dtsname);
+ dev, dev ? dev->dtsname : "None (not found)");
/* If this is not a multi function device, or the device is
* not present don't waste time probing another function.
--
http://www.hailfinger.org/
More information about the coreboot
mailing list