diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-12-07 01:55:51 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-10 21:46:12 -0500 |
commit | b76e5e93982f28666aeef1055264f5eac76311b0 (patch) | |
tree | b3ae26306c6868a3beabec0516fdcd35a954b06f /arch | |
parent | 1dee20262f4b16db73b2f24036bd423e8a7d693d (diff) |
[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')
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_driver.c | 4 |
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) | |||
310 | const char *location, *pci_str, *drv_str; | 310 | const char *location, *pci_str, *drv_str; |
311 | 311 | ||
312 | frozen_dn = find_device_pe(event->dn); | 312 | frozen_dn = find_device_pe(event->dn); |
313 | frozen_bus = pcibios_find_pci_bus(frozen_dn); | ||
314 | |||
315 | if (!frozen_dn) { | 313 | if (!frozen_dn) { |
316 | 314 | ||
317 | location = of_get_property(event->dn, "ibm,loc-code", NULL); | 315 | location = of_get_property(event->dn, "ibm,loc-code", NULL); |
@@ -321,6 +319,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) | |||
321 | location, pci_name(event->dev)); | 319 | location, pci_name(event->dev)); |
322 | return NULL; | 320 | return NULL; |
323 | } | 321 | } |
322 | |||
323 | frozen_bus = pcibios_find_pci_bus(frozen_dn); | ||
324 | location = of_get_property(frozen_dn, "ibm,loc-code", NULL); | 324 | location = of_get_property(frozen_dn, "ibm,loc-code", NULL); |
325 | location = location ? location : "unknown"; | 325 | location = location ? location : "unknown"; |
326 | 326 | ||