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>
This commit is contained in:
Sean Wang 2016-09-01 10:47:35 +08:00 committed by David S. Miller
parent 1e515b7fdb
commit aa6e8a54f6

View File

@ -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;
}