summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAmerigo Wang <amwang@redhat.com>2012-10-28 18:43:53 +0100
committerDavid S. Miller <davem@davemloft.net>2012-11-03 19:50:15 +0100
commit1a9408355e91c21eaf4626386d65988a0ad7dc21 (patch)
tree17868f2436cf49159a58766b34bd77994990c377 /net
parentpktgen: clean up ktime_t helpers (diff)
downloadlinux-1a9408355e91c21eaf4626386d65988a0ad7dc21.tar.xz
linux-1a9408355e91c21eaf4626386d65988a0ad7dc21.zip
ipv6: remove a useless NULL check
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/addrconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 387b813f227d..ced58e1d91b6 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