summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-11-17 02:19:25 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 14:37:00 -0800
commitb0d974e90d6f9fbf3a926defbbc76543cff74426 (patch)
tree02311da0df99efe54718c8a54727980629569161 /drivers/pci
parent9d167dc367f22c07285137370816b83b4be9c697 (diff)
downloadblackbird-op-linux-b0d974e90d6f9fbf3a926defbbc76543cff74426.tar.gz
blackbird-op-linux-b0d974e90d6f9fbf3a926defbbc76543cff74426.zip
PCI: ibmphp_pci.c: fix NULL dereference
The correct order is: NULL check before dereference Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/ibmphp_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index d87a9e3eaeeb..d8f05d7a3c72 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -1371,12 +1371,12 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
}
bus = ibmphp_find_res_bus (sec_number);
- debug ("bus->busno is %x\n", bus->busno);
- debug ("sec_number is %x\n", sec_number);
if (!bus) {
err ("cannot find Bus structure for the bridged device\n");
return -EINVAL;
}
+ debug("bus->busno is %x\n", bus->busno);
+ debug("sec_number is %x\n", sec_number);
ibmphp_remove_bus (bus, busno);
OpenPOWER on IntegriCloud