diff options
| author | Andrew Goodbody <[email protected]> | 2025-08-05 12:23:06 +0100 |
|---|---|---|
| committer | Fabio Estevam <[email protected]> | 2025-08-07 08:16:18 -0300 |
| commit | 53158c8cf269f05c2d25769024cb0c363aac5e7a (patch) | |
| tree | 56eaa968599c970e97dd2c284f567ed8dedbf496 | |
| parent | d011462eea859dde74431f1eb8b8d9cea8ebf005 (diff) | |
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 <[email protected]>
| -rw-r--r-- | drivers/net/fec_mxc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 54b08482b91..9ac72d25ef6 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -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); |
