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:
parent
1e515b7fdb
commit
aa6e8a54f6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user