Skip to content

Commit baee199

Browse files
Zhang Changzhongkuba-moo
authored andcommitted
net: ethernet: mtk-star-emac: fix error return code in mtk_star_enable()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 8c7bd5a ("net: ethernet: mtk-star-emac: new driver") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zhang Changzhong <[email protected]> Acked-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e8aa6d5 commit baee199

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/mediatek/mtk_star_emac.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,7 @@ static int mtk_star_enable(struct net_device *ndev)
966966
mtk_star_adjust_link, 0, priv->phy_intf);
967967
if (!priv->phydev) {
968968
netdev_err(ndev, "failed to connect to PHY\n");
969+
ret = -ENODEV;
969970
goto err_free_irq;
970971
}
971972

0 commit comments

Comments
 (0)