Netdev List
 help / color / mirror / Atom feed
* [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

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