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 <andrew.goodbody@linaro.org>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
This commit is contained in:
Andrew Goodbody
2025-08-08 15:58:10 +08:00
committed by Tien Fong Chee
parent 3526f990b7
commit 7701cc3415
+1 -1
View File
@@ -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))