* [PATCH] macsec: Fix invalid error code set
@ 2022-11-18 1:12 YueHaibing
2022-11-18 2:49 ` Saeed Mahameed
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: YueHaibing @ 2022-11-18 1:12 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, atenart; +Cc: netdev, linux-kernel, YueHaibing
'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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] macsec: Fix invalid error code set
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
2022-11-19 3:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2022-11-18 2:49 UTC (permalink / raw)
To: YueHaibing; +Cc: davem, edumazet, kuba, pabeni, atenart, netdev, linux-kernel
On 18 Nov 09:12, YueHaibing wrote:
>'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>
I have the same exact patch lined up in my internal queue.
this needs to go to net: so for next time please tag [PATCH net].
Reviewed-by: Saeed Mahameed <saeed@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] macsec: Fix invalid error code set
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
2022-11-19 3:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Antoine Tenart @ 2022-11-18 8:34 UTC (permalink / raw)
To: YueHaibing, davem, edumazet, kuba, pabeni
Cc: netdev, linux-kernel, YueHaibing
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] macsec: Fix invalid error code set
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
@ 2022-11-19 3:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-19 3:50 UTC (permalink / raw)
To: YueHaibing; +Cc: davem, edumazet, kuba, pabeni, atenart, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 18 Nov 2022 09:12:49 +0800 you wrote:
> '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>
> ---
> drivers/net/macsec.c | 1 -
> 1 file changed, 1 deletion(-)
Here is the summary with links:
- macsec: Fix invalid error code set
https://git.kernel.org/netdev/net/c/7cef6b73fba9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-19 3:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-11-19 3:50 ` patchwork-bot+netdevbpf
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).