* [PATCH] net: bcmasp: fix early exit leak with fixed phy
@ 2026-01-22 19:40 Justin Chen
2026-01-22 19:43 ` Florian Fainelli
2026-01-23 19:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Justin Chen @ 2026-01-22 19:40 UTC (permalink / raw)
To: netdev
Cc: bcm-kernel-feedback-list, horms, pabeni, kuba, edumazet, davem,
andrew+netdev, florian.fainelli, Justin Chen
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 <justin.chen@broadcom.com>
---
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 b9973956c480..ceb6c11431dd 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
@@ -1261,7 +1261,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);
@@ -1286,6 +1286,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.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: bcmasp: fix early exit leak with fixed phy
2026-01-22 19:40 [PATCH] net: bcmasp: fix early exit leak with fixed phy Justin Chen
@ 2026-01-22 19:43 ` Florian Fainelli
2026-01-23 19:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2026-01-22 19:43 UTC (permalink / raw)
To: Justin Chen, netdev
Cc: bcm-kernel-feedback-list, horms, pabeni, kuba, edumazet, davem,
andrew+netdev
On 1/22/2026 11:40 AM, Justin Chen wrote:
> 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 <justin.chen@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: bcmasp: fix early exit leak with fixed phy
2026-01-22 19:40 [PATCH] net: bcmasp: fix early exit leak with fixed phy Justin Chen
2026-01-22 19:43 ` Florian Fainelli
@ 2026-01-23 19:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-23 19:00 UTC (permalink / raw)
To: Justin Chen
Cc: netdev, bcm-kernel-feedback-list, horms, pabeni, kuba, edumazet,
davem, andrew+netdev, florian.fainelli
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 22 Jan 2026 11:40:01 -0800 you wrote:
> 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 <justin.chen@broadcom.com>
> ---
> drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Here is the summary with links:
- net: bcmasp: fix early exit leak with fixed phy
https://git.kernel.org/netdev/net/c/6de4436bf369
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-23 19:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 19:40 [PATCH] net: bcmasp: fix early exit leak with fixed phy Justin Chen
2026-01-22 19:43 ` Florian Fainelli
2026-01-23 19:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox