fib: rules: remove repeated assignment in fib_nl2rule
authorZhengchao Shao <shaozhengchao@huawei.com>
Fri, 5 Jan 2024 06:56:34 +0000 (14:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 7 Jan 2024 15:16:19 +0000 (15:16 +0000)
In fib_nl2rule(), 'err' variable has been set to -EINVAL during
declaration, and no need to set the 'err' variable to -EINVAL again.
So, remove it.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/fib_rules.c

index 96622bfb838ab2382563ee0ec5585c5d2bf65dcd..3f933ffcefc3732ede48669cf0ab9e94fed46aac 100644 (file)
@@ -593,7 +593,6 @@ static int fib_nl2rule(struct sk_buff *skb, struct nlmsghdr *nlh,
        if (tb[FRA_TUN_ID])
                nlrule->tun_id = nla_get_be64(tb[FRA_TUN_ID]);
 
-       err = -EINVAL;
        if (tb[FRA_L3MDEV] &&
            fib_nl2rule_l3mdev(tb[FRA_L3MDEV], nlrule, extack) < 0)
                goto errout_free;