From: Amerigo Wang Date: Sun, 28 Oct 2012 17:43:53 +0000 (+0000) Subject: ipv6: remove a useless NULL check X-Git-Tag: v3.8-rc1~139^2~463 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a9408355e91c21eaf4626386d65988a0ad7dc21;p=platform%2Fkernel%2Flinux-exynos.git 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 Cc: David S. Miller Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 387b813..ced58e1 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