netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule
@ 2024-01-05  6:56 Zhengchao Shao
  2024-01-05 21:39 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zhengchao Shao @ 2024-01-05  6:56 UTC (permalink / raw)
  To: netdev, davem, edumazet, kuba, pabeni
  Cc: weiyongjun1, yuehaibing, shaozhengchao

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>
---
 net/core/fib_rules.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 75282222e0b4..a50a0bde8db1 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -594,7 +594,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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-07 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05  6:56 [PATCH net-next] fib: rules: remove repeated assignment in fib_nl2rule Zhengchao Shao
2024-01-05 21:39 ` Simon Horman
2024-01-06 16:08 ` David Ahern
2024-01-07 15:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).