Skip to content

Commit d1d8392

Browse files
lunnPaolo Abeni
authored andcommitted
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 <andrew@lunn.ch> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com> Link: https://patch.msgid.link/20260206-ftgmac-cleanup-v5-7-ad28a9067ea7@aspeedtech.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 4659cce commit d1d8392

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/faraday/ftgmac100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1914,7 +1914,7 @@ static int ftgmac100_probe(struct platform_device *pdev)
19141914
/* MAC address from chip or random one */
19151915
err = ftgmac100_initial_mac(priv);
19161916
if (err)
1917-
goto err_phy_connect;
1917+
return err;
19181918

19191919
if (priv->mac_id == FTGMAC100_AST2400 ||
19201920
priv->mac_id == FTGMAC100_AST2500 ||

0 commit comments

Comments
 (0)