projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1dee202
)
[POWERPC] EEH: Avoid a possible NULL pointer dereference
author
Stephen Rothwell
<sfr@canb.auug.org.au>
Fri, 7 Dec 2007 06:55:51 +0000
(17:55 +1100)
committer
Paul Mackerras
<paulus@samba.org>
Tue, 11 Dec 2007 02:46:12 +0000
(13:46 +1100)
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/pseries/eeh_driver.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/platforms/pseries/eeh_driver.c
b/arch/powerpc/platforms/pseries/eeh_driver.c
index 06b89b56d0e92a9dce9739af67d49e0a51df2ea1..68ea5eee39a832ddd054b9fe36d78d301f884f67 100644
(file)
--- 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";