mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
net: fec_mxc: Set error code on error exit
In fecmxc_probe if a timeout is detected when resetting the chip no error code is set before taking the error exit. This could lead to a silent failure. Instead set an error code. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
This commit is contained in:
committed by
Fabio Estevam
parent
d011462eea
commit
53158c8cf2
@@ -1344,6 +1344,7 @@ static int fecmxc_probe(struct udevice *dev)
|
||||
while (readl(&priv->eth->ecntrl) & FEC_ECNTRL_RESET) {
|
||||
if (get_timer(start) > (CONFIG_SYS_HZ * 5)) {
|
||||
printf("FEC MXC: Timeout resetting chip\n");
|
||||
ret = -ETIMEDOUT;
|
||||
goto err_timeout;
|
||||
}
|
||||
udelay(10);
|
||||
|
||||
Reference in New Issue
Block a user