diff options
-rw-r--r-- | drivers/net/bfin_mac.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 2538eaa891ad..39a54bad397f 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -1466,6 +1466,11 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev) | |||
1466 | } | 1466 | } |
1467 | pd = pdev->dev.platform_data; | 1467 | pd = pdev->dev.platform_data; |
1468 | lp->mii_bus = platform_get_drvdata(pd); | 1468 | lp->mii_bus = platform_get_drvdata(pd); |
1469 | if (!lp->mii_bus) { | ||
1470 | dev_err(&pdev->dev, "Cannot get mii_bus!\n"); | ||
1471 | rc = -ENODEV; | ||
1472 | goto out_err_mii_bus_probe; | ||
1473 | } | ||
1469 | lp->mii_bus->priv = ndev; | 1474 | lp->mii_bus->priv = ndev; |
1470 | 1475 | ||
1471 | rc = mii_probe(ndev); | 1476 | rc = mii_probe(ndev); |
@@ -1511,6 +1516,7 @@ out_err_request_irq: | |||
1511 | out_err_mii_probe: | 1516 | out_err_mii_probe: |
1512 | mdiobus_unregister(lp->mii_bus); | 1517 | mdiobus_unregister(lp->mii_bus); |
1513 | mdiobus_free(lp->mii_bus); | 1518 | mdiobus_free(lp->mii_bus); |
1519 | out_err_mii_bus_probe: | ||
1514 | peripheral_free_list(pin_req); | 1520 | peripheral_free_list(pin_req); |
1515 | out_err_probe_mac: | 1521 | out_err_probe_mac: |
1516 | platform_set_drvdata(pdev, NULL); | 1522 | platform_set_drvdata(pdev, NULL); |