From: Sean Wang Date: Thu, 1 Sep 2016 02:47:35 +0000 (+0800) Subject: net: ethernet: mediatek: fix error handling inside mtk_mdio_init X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aa6e8a54f653daaf34ff7fdceb2d992d714eea7c;p=linux-beck.git 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 Acked-by: John Crispin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- 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; }