From nobody Sun Feb 8 14:53:43 2026 Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A9042D7DF5; Mon, 5 Jan 2026 07:09:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767596957; cv=none; b=akwtoVqkd+5/v8Tw6gSHL3Ynhe2cDLliI/VyFpWKZiPTo0WQWBma3K0i0I7bahaPYi4zL+tP8KsKfxmzf6XI/0nJFRBL6J4p9N4AVUqw3P7M6XSFEnrPo0zny6D9Jeg+x2bBBejBI1SpF6ohynWvb275F7fO6hbw+OC1kzDBQ30= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767596957; c=relaxed/simple; bh=z//e7dnJwDUefg9plCWZ1BC4LS+uCzdCRIPDrD9AN10=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=e84zwyG+7Qs2lIj46D8ZU0IVXy2ovoZuQGelReNvS88vrqKLA55R6OyRCkJSWT7lJfzx09n7eyp6hkEUMO2ZBj+1XmBdQTHp+nBPvp/vtHjUTfTBFrvXqsH53SNnKhvRxyYBU75iwlaLZ1WdcgYGJUJJRzTtd5H6KHVgyyfKf6A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Mon, 5 Jan 2026 15:08:52 +0800 Received: from [127.0.1.1] (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Mon, 5 Jan 2026 15:08:52 +0800 From: Jacky Chou Date: Mon, 5 Jan 2026 15:08:53 +0800 Subject: [PATCH 07/15] net: ftgmac100: Simplify error handling for ftgmac100_initial_mac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260105-ftgmac-cleanup-v1-7-b68e4a3d8fbe@aspeedtech.com> References: <20260105-ftgmac-cleanup-v1-0-b68e4a3d8fbe@aspeedtech.com> In-Reply-To: <20260105-ftgmac-cleanup-v1-0-b68e4a3d8fbe@aspeedtech.com> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni CC: , , Andrew Lunn , Jacky Chou X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767596931; l=959; i=jacky_chou@aspeedtech.com; s=20251031; h=from:subject:message-id; bh=mJWTzLOf+0tWdMKdPoK0MzjDkxQF4h6Ohksflvry0uo=; b=Cdci9LfWLkkcIr9oTGnOLZCMs20vbUOHxeA53qgd+8/KitN0mJqna2EQJRFBba+ayc0YzecCM qVLeyX/La9TBmCB6eg8ljOjpQJciQlCwIgwHVHp5Sv+S/1PWZdo2xCP X-Developer-Key: i=jacky_chou@aspeedtech.com; a=ed25519; pk=8XBx7KFM1drEsfCXTH9QC2lbMlGU4XwJTA6Jt9Mabdo= From: Andrew Lunn 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 Signed-off-by: Jacky Chou --- drivers/net/ethernet/faraday/ftgmac100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/etherne= t/faraday/ftgmac100.c index 3972076ffcf6..df030d85b3ce 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -1913,7 +1913,7 @@ static int ftgmac100_probe(struct platform_device *pd= ev) /* MAC address from chip or random one */ err =3D ftgmac100_initial_mac(priv); if (err) - goto err_phy_connect; + return err; =20 if (priv->mac_id =3D=3D FTGMAC100_AST2400 || priv->mac_id =3D=3D FTGMAC100_AST2500 || --=20 2.34.1