macsec: Fix invalid error code set
authorYueHaibing <yuehaibing@huawei.com>
Fri, 18 Nov 2022 01:12:49 +0000 (09:12 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 19 Nov 2022 03:42:12 +0000 (19:42 -0800)
commit7cef6b73fba96abef731a53501924fc3c4a0f947
treea34cd8c13e8f0f0955fe830a94fedb3c73064814
parent4d633d1b468b6eb107a81b2fd10b9debddca3d47
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>
drivers/net/macsec.c