spin_unlock_bh(&ifp->lock);
regen_advance = idev->cnf.regen_max_retry *
- idev->cnf.dad_transmits *
- idev->nd_parms->retrans_time / HZ;
+ idev->cnf.dad_transmits *
+ idev->nd_parms->retrans_time / HZ;
write_unlock(&idev->lock);
/* A temporary address is created only if this calculated Preferred
if (!dev)
return -ENODEV;
- idev = __in6_dev_get(dev);
- if (!idev)
+ if ((idev = __in6_dev_get(dev)) == NULL)
return -ENXIO;
read_lock_bh(&idev->lock);
ASSERT_RTNL();
- idev = ipv6_find_idev(dev);
- if (!idev) {
+ if ((idev = ipv6_find_idev(dev)) == NULL) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
* our v4 addrs in the tunnel
*/
- idev = ipv6_find_idev(dev);
- if (!idev) {
+ if ((idev = ipv6_find_idev(dev)) == NULL) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
ASSERT_RTNL();
- idev = ipv6_find_idev(dev);
- if (!idev) {
+ if ((idev = ipv6_find_idev(dev)) == NULL) {
pr_debug("%s: add_dev failed\n", __func__);
return;
}
struct net *net = dev_net(idev->dev);
/* first try to inherit the link-local address from the link device */
- if (idev->dev->iflink)
- link_dev = __dev_get_by_index(net, idev->dev->iflink);
- if (link_dev && !ipv6_inherit_linklocal(idev, link_dev))
+ if (idev->dev->iflink &&
+ (link_dev = __dev_get_by_index(net, idev->dev->iflink))) {
+ if (!ipv6_inherit_linklocal(idev, link_dev))
return;
-
+ }
/* then try to inherit it from any device */
for_each_netdev(net, link_dev) {
if (!ipv6_inherit_linklocal(idev, link_dev))