From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7BD2B2D8DA3; Wed, 4 Feb 2026 15:23:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770218636; cv=none; b=mEQjnJbeRj2VrEJoJPlQMZFyv4T+1qumnqpcA+HCnTVhcMiOBASJ/2V2zf6q7nKZhh9KC3JNYIiU05LwMMu6jfC0Fe9JSvO5c4+cuGWI5v6vUQvEGeSeRVUDWZxqx4RtdYq98Y3I3PpW0uy7lm5FU/H2vCg0cHeOGNDjEjTX23g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770218636; c=relaxed/simple; bh=T89xYkEP7T9yslWVTrvb/bZM2j+ABi6bQq4WSzUU5io=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iX0bIohTM3KhvirhGKXcKAoJqxz+ChoWEAG//gbQ+NQ6D9LjndvLvyPvWnCFhmnk8glggfJr2o+Uos/r+/xdNiMsuGCW+qVfQU5dRQC0Ur71ESvP/KYf/yGeIjMqdrCLGJzXeU6G/RPVlsrR/tQY5VbPx5+SOZk+qWgt9dW9ln4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X5GPxkMK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="X5GPxkMK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7006C4CEF7; Wed, 4 Feb 2026 15:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770218636; bh=T89xYkEP7T9yslWVTrvb/bZM2j+ABi6bQq4WSzUU5io=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X5GPxkMKC/fUdio8vVSc8O+ZAy7SvM4u9w0CMLqAu46TjVFGqY2pnURQWp9OVnioi 8Krg8HD8W9n6aiGp5wV28GgG0qjf6ivJKNVuZpUk7duAA4FBtraSpfpp4SGBj8qFCG Sz+giEvDJ79iWzp3GIXr0h0nxu1vJcIVvBwqBBVo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Justin Chen , Florian Fainelli , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.12 06/87] net: bcmasp: fix early exit leak with fixed phy Date: Wed, 4 Feb 2026 15:40:04 +0100 Message-ID: <20260204143847.142384683@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260204143846.906385641@linuxfoundation.org> References: <20260204143846.906385641@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Justin Chen [ Upstream commit 6de4436bf369e1444606445e4cd5df5bcfc74b48 ] We are not deregistering the fixed phy link when hitting the early exit condition. Add the correct early exit sequence. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20260122194001.1098859-1-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c index 9ea16ef4139d3..79185bafaf4b3 100644 --- a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c @@ -1253,7 +1253,7 @@ struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv, netdev_err(intf->ndev, "invalid PHY mode: %s for port %d\n", phy_modes(intf->phy_interface), intf->port); ret = -EINVAL; - goto err_free_netdev; + goto err_deregister_fixed_link; } ret = of_get_ethdev_address(ndev_dn, ndev); @@ -1276,6 +1276,9 @@ struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv, return intf; +err_deregister_fixed_link: + if (of_phy_is_fixed_link(ndev_dn)) + of_phy_deregister_fixed_link(ndev_dn); err_free_netdev: free_netdev(ndev); err: -- 2.51.0