Commit aa6e8a54 authored by Sean Wang's avatar Sean Wang Committed by David S. Miller

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: default avatarSean Wang <sean.wang@mediatek.com>
Acked-by: default avatarJohn Crispin <john@phrozen.org>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1e515b7f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment