]> err.no Git - linux-2.6/blobdiff - arch/sparc64/kernel/ebus.c
[ARM] 4652/1: pxa: fix a typo of pxa27x usb host clk definition
[linux-2.6] / arch / sparc64 / kernel / ebus.c
index bc9ae36f7a43cd1de77cf6469762f21fc4ce6bd3..04ab81cb4f483f24e78c6d74c40e044d29383203 100644 (file)
@@ -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++)