All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Chenguang Zhao'" <zhaochenguang@kylinos.cn>,
	"'Mengyuan Lou'" <mengyuanlou@net-swift.com>,
	"'Andrew Lunn'" <andrew+netdev@lunn.ch>,
	"'David S. Miller'" <davem@davemloft.net>,
	"'Eric Dumazet'" <edumazet@google.com>,
	"'Jakub Kicinski'" <kuba@kernel.org>,
	"'Paolo Abeni'" <pabeni@redhat.com>
Cc: "'Simon Horman'" <horms@kernel.org>, <netdev@vger.kernel.org>
Subject: RE: [net-next] net: txgbe: fix phylink leak on AML init failure
Date: Mon, 25 May 2026 09:41:53 +0800	[thread overview]
Message-ID: <03b101dcebe7$aa3205d0$fe961170$@trustnetic.com> (raw)
In-Reply-To: <20260522070749.1634542-1-zhaochenguang@kylinos.cn>

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!
 


      parent reply	other threads:[~2026-05-25  1:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='03b101dcebe7$aa3205d0$fe961170$@trustnetic.com' \
    --to=jiawenwu@trustnetic.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=zhaochenguang@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.