* [net-next] net: txgbe: fix phylink leak on AML init failure
@ 2026-05-22 7:07 Chenguang Zhao
2026-05-22 7:26 ` Maxime Chevallier
2026-05-25 1:41 ` Jiawen Wu
0 siblings, 2 replies; 3+ messages in thread
From: Chenguang Zhao @ 2026-05-22 7:07 UTC (permalink / raw)
To: Jiawen Wu, Mengyuan Lou, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Chenguang Zhao, Simon Horman, netdev
Destroy the phylink instance when fixed-link setup fails.
Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
---
drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
index f0514251d4f3..8e301e7d1148 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
@@ -521,6 +521,7 @@ int txgbe_phylink_init_aml(struct txgbe *txgbe)
err = phylink_set_fixed_link(phylink, &state);
if (err) {
wx_err(wx, "Failed to set fixed link\n");
+ phylink_destroy(phylink);
return err;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [net-next] net: txgbe: fix phylink leak on AML init failure
2026-05-22 7:07 [net-next] net: txgbe: fix phylink leak on AML init failure Chenguang Zhao
@ 2026-05-22 7:26 ` Maxime Chevallier
2026-05-25 1:41 ` Jiawen Wu
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Chevallier @ 2026-05-22 7:26 UTC (permalink / raw)
To: Chenguang Zhao, Jiawen Wu, Mengyuan Lou, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev
Hi,
On 5/22/26 09:07, Chenguang Zhao wrote:
> Destroy the phylink instance when fixed-link setup fails.
This should probably be a fix then, targeting the 'net' tree with a
Fixes tag.
>
> Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
With the above comment sorted out,
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
> ---
> drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
> index f0514251d4f3..8e301e7d1148 100644
> --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
> +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
> @@ -521,6 +521,7 @@ int txgbe_phylink_init_aml(struct txgbe *txgbe)
> err = phylink_set_fixed_link(phylink, &state);
> if (err) {
> wx_err(wx, "Failed to set fixed link\n");
> + phylink_destroy(phylink);
> return err;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: [net-next] net: txgbe: fix phylink leak on AML init failure
2026-05-22 7:07 [net-next] net: txgbe: fix phylink leak on AML init failure Chenguang Zhao
2026-05-22 7:26 ` Maxime Chevallier
@ 2026-05-25 1:41 ` Jiawen Wu
1 sibling, 0 replies; 3+ messages in thread
From: Jiawen Wu @ 2026-05-25 1:41 UTC (permalink / raw)
To: 'Chenguang Zhao', 'Mengyuan Lou',
'Andrew Lunn', 'David S. Miller',
'Eric Dumazet', 'Jakub Kicinski',
'Paolo Abeni'
Cc: 'Simon Horman', netdev
On Fri, May 22, 2026 3:08 PM, Chenguang Zhao wrote:
> Destroy the phylink instance when fixed-link setup fails.
>
> Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
> ---
> drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
> index f0514251d4f3..8e301e7d1148 100644
> --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
> +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
> @@ -521,6 +521,7 @@ int txgbe_phylink_init_aml(struct txgbe *txgbe)
> err = phylink_set_fixed_link(phylink, &state);
> if (err) {
> wx_err(wx, "Failed to set fixed link\n");
> + phylink_destroy(phylink);
> return err;
> }
>
Reviewed-by: Jiawen Wu <jiawenwu@trustnetic.com>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-25 1:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 7:07 [net-next] net: txgbe: fix phylink leak on AML init failure Chenguang Zhao
2026-05-22 7:26 ` Maxime Chevallier
2026-05-25 1:41 ` Jiawen Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox