From: Antoine Tenart <atenart@kernel.org>
To: YueHaibing <yuehaibing@huawei.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
YueHaibing <yuehaibing@huawei.com>
Subject: Re: [PATCH] macsec: Fix invalid error code set
Date: Fri, 18 Nov 2022 09:34:02 +0100 [thread overview]
Message-ID: <166876044229.7589.614742433983865@kwain.local> (raw)
In-Reply-To: <20221118011249.48112-1-yuehaibing@huawei.com>
Quoting YueHaibing (2022-11-18 02:12:49)
> 'ret' is defined twice in macsec_changelink(), when it is set in macsec_is_offloaded
> case, it will be invalid before return.
>
> Fixes: 3cf3227a21d1 ("net: macsec: hardware offloading infrastructure")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Antoine Tenart <atenart@kernel.org>
Thanks!
> ---
> drivers/net/macsec.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
> index a7b46219bab7..d73b9d535b7a 100644
> --- a/drivers/net/macsec.c
> +++ b/drivers/net/macsec.c
> @@ -3835,7 +3835,6 @@ static int macsec_changelink(struct net_device *dev, struct nlattr *tb[],
> if (macsec_is_offloaded(macsec)) {
> const struct macsec_ops *ops;
> struct macsec_context ctx;
> - int ret;
>
> ops = macsec_get_ops(netdev_priv(dev), &ctx);
> if (!ops) {
> --
> 2.20.1
>
next prev parent reply other threads:[~2022-11-18 8:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 1:12 [PATCH] macsec: Fix invalid error code set YueHaibing
2022-11-18 2:49 ` Saeed Mahameed
2022-11-18 8:34 ` Antoine Tenart [this message]
2022-11-19 3:50 ` patchwork-bot+netdevbpf
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=166876044229.7589.614742433983865@kwain.local \
--to=atenart@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yuehaibing@huawei.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).