summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/ebus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-02 10:35:28 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-02 10:35:28 -0700
commit114d5b1ca265f8a582dcbf0030da20ccdddbe8e1 (patch)
tree7c3ada09fe64eadf184a0b59e83b176fd2a72b65 /arch/sparc64/kernel/ebus.c
parent2b3b29080d702e5488f214276170ab46adc40ee5 (diff)
parent25e5566ed38650f7990041fcd20571d6ddd2a040 (diff)
downloadlinux-114d5b1ca265f8a582dcbf0030da20ccdddbe8e1.tar.bz2
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Fix missing load-twin usage in Niagara-1 memcpy. [SPARC64]: Fix put_user() calls in binfmt_aout32.c [SPARC]: Fix EBUS use of uninitialized variable.
Diffstat (limited to 'arch/sparc64/kernel/ebus.c')
-rw-r--r--arch/sparc64/kernel/ebus.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index bc9ae36f7a43..04ab81cb4f48 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -375,7 +375,10 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de
dev->num_addrs = 0;
dev->num_irqs = 0;
} else {
- (void) of_get_property(dp, "reg", &len);
+ const int *regs = of_get_property(dp, "reg", &len);
+
+ if (!regs)
+ len = 0;
dev->num_addrs = len / sizeof(struct linux_prom_registers);
for (i = 0; i < dev->num_addrs; i++)