提交 1a940835 编写于 作者: A Amerigo Wang 提交者: David S. Miller

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: NFengguang Wu <fengguang.wu@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: NCong Wang <amwang@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 398f382c
...@@ -607,7 +607,7 @@ static void dev_forward_change(struct inet6_dev *idev) ...@@ -607,7 +607,7 @@ static void dev_forward_change(struct inet6_dev *idev)
dev = idev->dev; dev = idev->dev;
if (idev->cnf.forwarding) if (idev->cnf.forwarding)
dev_disable_lro(dev); dev_disable_lro(dev);
if (dev && (dev->flags & IFF_MULTICAST)) { if (dev->flags & IFF_MULTICAST) {
if (idev->cnf.forwarding) if (idev->cnf.forwarding)
ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters); ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册