Skip to contentSkip to conversation

ipv6: remove a useless NULL check

PATCH Applied Cong Wang 2 participants 2 messages Oct 29, 2012 – Nov 3, 2012

Subsystems (3)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 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.

---

net/ipv6/addrconf.c +1 -1
index 8f0b12a..c9b1cf3 100644
@@ -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