summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Goodbody <[email protected]>2025-08-04 16:11:37 +0100
committerTien Fong Chee <[email protected]>2025-08-08 15:58:10 +0800
commit7701cc3415db98d0b2cc56ef8601939615254a2b (patch)
treec48a485c4d02b72c4a130801f0b2de9e64157f31 /drivers
parent3526f990b77fca1c933f1d8b24eb9385010a05bf (diff)
net: dwc_eth_xgmac: Use unwind goto on error
In xgmac_probe there is a direct return after the point where unwind gotos start to be used to undo actions performed by earlier code. Use the appropriate unwind goto instead. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/dwc_eth_xgmac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dwc_eth_xgmac.c b/drivers/net/dwc_eth_xgmac.c
index 03959ea95a5..d29d871ea8c 100644
--- a/drivers/net/dwc_eth_xgmac.c
+++ b/drivers/net/dwc_eth_xgmac.c
@@ -1102,7 +1102,7 @@ static int xgmac_probe(struct udevice *dev)
ret = xgmac->config->ops->xgmac_start_clks(dev);
if (ret < 0) {
pr_err("%s xgmac_start_clks() failed: %d\n", dev->name, ret);
- return ret;
+ goto err_remove_resources_core;
}
if (IS_ENABLED(CONFIG_DM_ETH_PHY))