summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mediatek
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2016-09-01 10:47:35 +0800
committerDavid S. Miller <davem@davemloft.net>2016-08-31 20:53:48 -0700
commitaa6e8a54f653daaf34ff7fdceb2d992d714eea7c (patch)
treec14d5195812c5c760f29d9f228c4c56001554525 /drivers/net/ethernet/mediatek
parent1e515b7fdbaeef29b1025c09b50ebbb132a39208 (diff)
net: ethernet: mediatek: fix error handling inside mtk_mdio_init
Return -ENODEV if the MDIO bus is disabled in the device tree. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Acked-by: John Crispin <john@phrozen.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mediatek')
-rw-r--r--drivers/net/ethernet/mediatek/mtk_eth_soc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 0367f510f81a..d9199151a83e 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -304,7 +304,7 @@ static int mtk_mdio_init(struct mtk_eth *eth)
}
if (!of_device_is_available(mii_np)) {
- ret = 0;
+ ret = -ENODEV;
goto err_put_node;
}