From: Andrew Lunn Date: Fri, 6 Feb 2026 03:17:47 +0000 (+0800) Subject: net: ftgmac100: Simplify error handling for ftgmac100_initial_mac X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1d8392883bf2e7fdbd308cc1c986ad5072493e4;p=thirdparty%2Fkernel%2Flinux.git net: ftgmac100: Simplify error handling for ftgmac100_initial_mac ftgmac100_initial_mac() does not allocate any resources. All resources by the probe function up until this call point use devm_ methods. So just return the error code rather than use a goto. Signed-off-by: Andrew Lunn Reviewed-by: Simon Horman Signed-off-by: Jacky Chou Link: https://patch.msgid.link/20260206-ftgmac-cleanup-v5-7-ad28a9067ea7@aspeedtech.com Signed-off-by: Paolo Abeni --- diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 1fb03dd55c8f1..e511d6d5f7c2e 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -1914,7 +1914,7 @@ static int ftgmac100_probe(struct platform_device *pdev) /* MAC address from chip or random one */ err = ftgmac100_initial_mac(priv); if (err) - goto err_phy_connect; + return err; if (priv->mac_id == FTGMAC100_AST2400 || priv->mac_id == FTGMAC100_AST2500 ||