]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/fec_mpc52xx_phy.c
[POWERPC] mpc5200-fec: Fix possible NULL dereference in mdio driver
[linux-2.6-omap-h63xx.git] / drivers / net / fec_mpc52xx_phy.c
index 1837584c4504dd82f56db27d9326d9763b3ffe83..6a3ac4ea97e90af21bc7ab0cb0cea66dad7cf7cd 100644 (file)
@@ -109,7 +109,8 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, const struct of_device_i
                int irq = irq_of_parse_and_map(child, 0);
                if (irq != NO_IRQ) {
                        const u32 *id = of_get_property(child, "reg", NULL);
-                       bus->irq[*id] = irq;
+                       if (id)
+                               bus->irq[*id] = irq;
                }
        }