summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2022-11-18 02:12:49 +0100
committerJakub Kicinski <kuba@kernel.org>2022-11-19 04:42:12 +0100
commit7cef6b73fba96abef731a53501924fc3c4a0f947 (patch)
treea34cd8c13e8f0f0955fe830a94fedb3c73064814 /drivers
parentbonding: fix ICMPv6 header handling when receiving IPv6 messages (diff)
downloadlinux-7cef6b73fba96abef731a53501924fc3c4a0f947.tar.xz
linux-7cef6b73fba96abef731a53501924fc3c4a0f947.zip
macsec: Fix invalid error code set
'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: Saeed Mahameed <saeed@kernel.org> Reviewed-by: Antoine Tenart <atenart@kernel.org> Link: https://lore.kernel.org/r/20221118011249.48112-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/macsec.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 85376d2f24ca..f41f67b583db 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) {