From: Zhengchao Shao <shaozhengchao@huawei.com>
Date: Fri, 5 Jan 2024 06:56:34 +0000 (+0800)
Subject: fib: rules: remove repeated assignment in fib_nl2rule
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c4a5ee9c09aa11f394b57674f525085034f5f68b;p=linux.git

fib: rules: remove repeated assignment in fib_nl2rule

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>
---

diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 96622bfb838ab..3f933ffcefc37 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -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;