From: Richard Mortimer <[EMAIL PROTECTED]>
The todm5819 Openboot device node on Netra X1 does not have a "reg"
property. In this case of_get_property returns NULL resulting in an
Oops. Avoid this by returning from isa_dev_get_resource() without
attempting to request_resource().
Signed-off-by: Richard Mortimer <[EMAIL PROTECTED]>
---
arch/sparc64/kernel/isa.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c
index ad1c4f5..cb556f0 100644
--- a/arch/sparc64/kernel/isa.c
+++ b/arch/sparc64/kernel/isa.c
@@ -31,6 +31,10 @@ isa_dev_get_resource(struct sparc_isa_device *isa_dev)
pregs = of_get_property(isa_dev->prom_node, "reg", &prop_len);
+ if (!pregs) {
+ return NULL;
+ }
+
/* Only the first one is interesting. */
len = pregs[0].reg_size;
base = (((unsigned long)pregs[0].which_io << 32) |
--
1.4.4.2
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html