* [Patch net-next] ipv6: remove a useless NULL check
@ 2012-10-29 3:43 Cong Wang
2012-11-03 18:52 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2012-10-29 3:43 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Cong Wang
In dev_forward_change(), it is useless to check if idev->dev
is NULL, it is always non-NULL here.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 8f0b12a..c9b1cf3 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -607,7 +607,7 @@ static void dev_forward_change(struct inet6_dev *idev)
dev = idev->dev;
if (idev->cnf.forwarding)
dev_disable_lro(dev);
- if (dev && (dev->flags & IFF_MULTICAST)) {
+ if (dev->flags & IFF_MULTICAST) {
if (idev->cnf.forwarding)
ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
else
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-03 18:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-29 3:43 [Patch net-next] ipv6: remove a useless NULL check Cong Wang
2012-11-03 18:52 ` David Miller
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).