netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Gencen Gan <gangecen@hust.edu.cn>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: amd: Fix link leak when verifying config failed
Date: Tue, 18 Apr 2023 15:52:15 -0700	[thread overview]
Message-ID: <20230418155215.24e7e140@kernel.org> (raw)
In-Reply-To: <20230417144750.3976715-1-gangecen@hust.edu.cn>

On Mon, 17 Apr 2023 22:47:50 +0800 Gencen Gan wrote:
> From: Gecen Gan <gangecen@hust.edu.cn>
> 
> After failing to verify configuration, it returns directly without 
> releasing link, which may cause memory leak.
> 
> Signed-off-by: Gecen Gan <gangecen@hust.edu.cn>
> ---
>  drivers/net/ethernet/amd/nmclan_cs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/amd/nmclan_cs.c b/drivers/net/ethernet/amd/nmclan_cs.c
> index 823a329a921f..0dd391c84c13 100644
> --- a/drivers/net/ethernet/amd/nmclan_cs.c
> +++ b/drivers/net/ethernet/amd/nmclan_cs.c
> @@ -651,7 +651,7 @@ static int nmclan_config(struct pcmcia_device *link)
>   } else {
>       pr_notice("mace id not found: %x %x should be 0x40 0x?9\n",
>  	  sig[0], sig[1]);
> -     return -ENODEV;
> +     goto failed;
>     }
>   }

The patch looks whitespace-damaged, it doesn't apply cleanly.
AFAICT there is one space missing in the indentation.
Probably your email server is doing something funny to it.

--
pw-bot: cr

      reply	other threads:[~2023-04-18 22:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 14:47 [PATCH] net: amd: Fix link leak when verifying config failed Gencen Gan
2023-04-18 22:52 ` Jakub Kicinski [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=20230418155215.24e7e140@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gangecen@hust.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).