mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 04:36:13 +02:00
net: mediatek: Use correct variable for return
In mtk_eth_of_to_plat, the last error check has the value in 'priv->phy_addr' but returns ret. Correct to return 'priv->phy_addr' instead. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
This commit is contained in:
parent
ed3b08874f
commit
ff36afe346
@ -1461,7 +1461,7 @@ static int mtk_eth_of_to_plat(struct udevice *dev)
|
||||
priv->phy_addr = ofnode_read_s32_default(args.node, "reg", -1);
|
||||
if (priv->phy_addr < 0) {
|
||||
printf("error: phy address is not specified\n");
|
||||
return ret;
|
||||
return priv->phy_addr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user