mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: mcast: Remove unnecessary null check in mld_del_delrec()
@ 2025-07-12  9:28 Yue Haibing
  2025-07-12 19:32 ` Markus Elfring
  2025-07-12 22:12 ` Kuniyuki Iwashima
  0 siblings, 2 replies; 5+ messages in thread
From: Yue Haibing @ 2025-07-12  9:28 UTC (permalink / raw)
  To: davem, dsahern, edumazet, kuba, pabeni, horms, kuniyu
  Cc: netdev, linux-kernel, yuehaibing

These is no need to check null for pmc twice.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
 net/ipv6/mcast.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 6c875721d423..f3dae72aa9d3 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -794,9 +794,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
 			rcu_assign_pointer(pmc_prev->next, pmc->next);
 		else
 			rcu_assign_pointer(idev->mc_tomb, pmc->next);
-	}
 
-	if (pmc) {
 		im->idev = pmc->idev;
 		if (im->mca_sfmode == MCAST_INCLUDE) {
 			tomb = rcu_replace_pointer(im->mca_tomb,
-- 
2.34.1


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

end of thread, other threads:[~2025-07-14  1:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-12  9:28 [PATCH net-next] ipv6: mcast: Remove unnecessary null check in mld_del_delrec() Yue Haibing
2025-07-12 19:32 ` Markus Elfring
2025-07-14  1:33   ` Yue Haibing
2025-07-12 22:12 ` Kuniyuki Iwashima
2025-07-14  1:32   ` Yue Haibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®