diff options
| author | Andrew Lunn <andrew@lunn.ch> | 2026-02-06 11:17:47 +0800 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-02-10 13:40:50 +0100 |
| commit | d1d8392883bf2e7fdbd308cc1c986ad5072493e4 (patch) | |
| tree | b7c78bce806f5961581a0784e7fb91c5ecbf1eb0 /drivers | |
| parent | 4659ccedf22b77f20d7e0cea68655b39675c434f (diff) | |
| download | linux-next-d1d8392883bf2e7fdbd308cc1c986ad5072493e4.tar.gz linux-next-d1d8392883bf2e7fdbd308cc1c986ad5072493e4.zip | |
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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/ethernet/faraday/ftgmac100.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 1fb03dd55c8f..e511d6d5f7c2 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 || |
