From: Amerigo Wang Date: Sun, 28 Oct 2012 17:43:53 +0000 (+0000) Subject: ipv6: remove a useless NULL check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1a9408355e91c21eaf4626386d65988a0ad7dc21;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 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