aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-12-07 17:55:51 +1100
committerPaul Mackerras <paulus@samba.org>2007-12-11 13:46:12 +1100
commitb76e5e93982f28666aeef1055264f5eac76311b0 (patch)
treeb3ae26306c6868a3beabec0516fdcd35a954b06f /arch/powerpc
parent[POWERPC] iSeries: Merge vpdinfo.c into pci.c (diff)
downloadlinux-dev-b76e5e93982f28666aeef1055264f5eac76311b0.tar.xz
linux-dev-b76e5e93982f28666aeef1055264f5eac76311b0.zip
[POWERPC] EEH: Avoid a possible NULL pointer dereference
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 06b89b56d0e9..68ea5eee39a8 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -310,8 +310,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
const char *location, *pci_str, *drv_str;
frozen_dn = find_device_pe(event->dn);
- frozen_bus = pcibios_find_pci_bus(frozen_dn);
-
if (!frozen_dn) {
location = of_get_property(event->dn, "ibm,loc-code", NULL);
@@ -321,6 +319,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
location, pci_name(event->dev));
return NULL;
}
+
+ frozen_bus = pcibios_find_pci_bus(frozen_dn);
location = of_get_property(frozen_dn, "ibm,loc-code", NULL);
location = location ? location : "unknown";