From: Yue Haibing Date: Tue, 24 Jun 2025 01:42:16 +0000 (+0800) Subject: neighbour: Remove redundant assignment to err X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b19b50c8d65e06d4ff7f230855a2a28ac200f35;p=thirdparty%2Fkernel%2Flinux.git neighbour: Remove redundant assignment to err 'err' has been checked against 0 in the if statement. Signed-off-by: Yue Haibing Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250624014216.3686659-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski --- diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 85a5535de8ba2..8ad9898f8e42c 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;