aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mdio-bcm-unimac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/mdio-bcm-unimac.c')
-rw-r--r--drivers/net/phy/mdio-bcm-unimac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio-bcm-unimac.c b/drivers/net/phy/mdio-bcm-unimac.c
index 52703bbd4d66..df75efa96a7d 100644
--- a/drivers/net/phy/mdio-bcm-unimac.c
+++ b/drivers/net/phy/mdio-bcm-unimac.c
@@ -237,6 +237,8 @@ static int unimac_mdio_probe(struct platform_device *pdev)
return -ENOMEM;
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!r)
+ return -EINVAL;
/* Just ioremap, as this MDIO block is usually integrated into an
* Ethernet MAC controller register range