mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: mcast: Remove unnecessary null check in ip6_mc_find_dev()
@ 2025-07-14  8:17 Yue Haibing
  2025-07-14 12:29 ` Simon Horman
  2025-07-15 23:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Yue Haibing @ 2025-07-14  8:17 UTC (permalink / raw)
  To: davem, dsahern, edumazet, kuba, pabeni, horms
  Cc: netdev, linux-kernel, yuehaibing

These is no need to check null for idev before return NULL.

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

diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index e95273ffb2f5..8aecdd85a6ae 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -329,9 +329,6 @@ static struct inet6_dev *ip6_mc_find_dev(struct net *net,
 	idev = in6_dev_get(dev);
 	dev_put(dev);
 
-	if (!idev)
-		return NULL;
-
 	return idev;
 }
 
-- 
2.34.1


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

end of thread, other threads:[~2025-07-15 23:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-14  8:17 [PATCH net-next] ipv6: mcast: Remove unnecessary null check in ip6_mc_find_dev() Yue Haibing
2025-07-14 12:29 ` Simon Horman
2025-07-14 16:39   ` Kuniyuki Iwashima
2025-07-15 23:40 ` 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

all inboxes | Powered by JetHome®