summaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorAmerigo Wang2012-10-28 18:43:53 +0100
committerDavid S. Miller2012-11-03 19:50:15 +0100
commit1a9408355e91c21eaf4626386d65988a0ad7dc21 (patch)
tree17868f2436cf49159a58766b34bd77994990c377 /net/ipv6/addrconf.c
parentpktgen: clean up ktime_t helpers (diff)
downloadkernel-qcow2-linux-1a9408355e91c21eaf4626386d65988a0ad7dc21.tar.gz
kernel-qcow2-linux-1a9408355e91c21eaf4626386d65988a0ad7dc21.tar.xz
kernel-qcow2-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/ipv6/addrconf.c')
-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