ipv6: remove a useless NULL check
authorAmerigo Wang <amwang@redhat.com>
Sun, 28 Oct 2012 17:43:53 +0000 (17:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Nov 2012 18:50:15 +0000 (14:50 -0400)
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>
net/ipv6/addrconf.c

index 387b813f227d576b8532b60ab2f564658770c10d..ced58e1d91b6593a4e6df6259b6c8c77127a7c60 100644 (file)
@@ -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