linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] neighbour: Remove redundant assignment to err
@ 2025-06-24  1:42 Yue Haibing
  2025-06-24 10:55 ` Simon Horman
  2025-06-25 22:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Yue Haibing @ 2025-06-24  1:42 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, horms, gnaaman
  Cc: netdev, linux-kernel, yuehaibing

'err' has been checked against 0 in the if statement.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
 net/core/neighbour.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 85a5535de8ba..8ad9898f8e42 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2055,10 +2055,8 @@ static int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh,
 
 	err = __neigh_update(neigh, lladdr, ndm->ndm_state, flags,
 			     NETLINK_CB(skb).portid, extack);
-	if (!err && ndm_flags & (NTF_USE | NTF_MANAGED)) {
+	if (!err && ndm_flags & (NTF_USE | NTF_MANAGED))
 		neigh_event_send(neigh, NULL);
-		err = 0;
-	}
 	neigh_release(neigh);
 out:
 	return err;
-- 
2.34.1


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

end of thread, other threads:[~2025-06-25 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24  1:42 [PATCH net-next] neighbour: Remove redundant assignment to err Yue Haibing
2025-06-24 10:55 ` Simon Horman
2025-06-25 22:50 ` 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).