projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
794b26e
)
[SPARC64]: check for possible NULL pointer dereference
author
Cyrill Gorcunov
<gorcunov@gmail.com>
Wed, 21 Nov 2007 01:32:19 +0000
(17:32 -0800)
committer
David S. Miller
<davem@sunset.davemloft.net>
Wed, 5 Dec 2007 13:37:59 +0000
(
05:37
-0800)
This patch adds checking for possible NULL pointer dereference
if of_find_property() failed.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/pci_sun4v.c
patch
|
blob
|
history
diff --git
a/arch/sparc64/kernel/pci_sun4v.c
b/arch/sparc64/kernel/pci_sun4v.c
index
8c4875b
..
e587a37
100644
(file)
--- a/
arch/sparc64/kernel/pci_sun4v.c
+++ b/
arch/sparc64/kernel/pci_sun4v.c
@@
-1022,6
+1022,10
@@
void __init sun4v_pci_init(struct device_node *dp, char *model_name)
}
prop = of_find_property(dp, "reg", NULL);
+ if (!prop) {
+ prom_printf("SUN4V_PCI: Could not find config registers\n");
+ prom_halt();
+ }
regs = prop->value;
devhandle = (regs->phys_addr >> 32UL) & 0x0fffffff;