mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
macsec: Fix invalid error code set
[ Upstream commit7cef6b73fb] 'ret' is defined twice in macsec_changelink(), when it is set in macsec_is_offloaded case, it will be invalid before return. Fixes:3cf3227a21("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
72be055615
commit
f42802e14a
|
|
@ -3813,7 +3813,6 @@ static int macsec_changelink(struct net_device *dev, struct nlattr *tb[],
|
||||||
if (macsec_is_offloaded(macsec)) {
|
if (macsec_is_offloaded(macsec)) {
|
||||||
const struct macsec_ops *ops;
|
const struct macsec_ops *ops;
|
||||||
struct macsec_context ctx;
|
struct macsec_context ctx;
|
||||||
int ret;
|
|
||||||
|
|
||||||
ops = macsec_get_ops(netdev_priv(dev), &ctx);
|
ops = macsec_get_ops(netdev_priv(dev), &ctx);
|
||||||
if (!ops) {
|
if (!ops) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user