diff options
| -rw-r--r-- | drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index a4a4e98effdd..d31f9e600639 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | |||
| @@ -1646,25 +1646,22 @@ static int cxgbi_inet6addr_handler(struct notifier_block *this, | |||
| 1646 | struct cxgbi_device *cdev; | 1646 | struct cxgbi_device *cdev; |
| 1647 | int ret = NOTIFY_DONE; | 1647 | int ret = NOTIFY_DONE; |
| 1648 | 1648 | ||
| 1649 | rcu_read_lock(); | ||
| 1650 | |||
| 1651 | if (event_dev->priv_flags & IFF_802_1Q_VLAN) | 1649 | if (event_dev->priv_flags & IFF_802_1Q_VLAN) |
| 1652 | event_dev = vlan_dev_real_dev(event_dev); | 1650 | event_dev = vlan_dev_real_dev(event_dev); |
| 1653 | 1651 | ||
| 1654 | cdev = cxgbi_device_find_by_netdev(event_dev, NULL); | 1652 | cdev = cxgbi_device_find_by_netdev(event_dev, NULL); |
| 1655 | if (!cdev) { | 1653 | |
| 1656 | rcu_read_unlock(); | 1654 | if (!cdev) |
| 1657 | return ret; | 1655 | return ret; |
| 1658 | } | 1656 | |
| 1659 | switch (event) { | 1657 | switch (event) { |
| 1660 | case NETDEV_UP: | 1658 | case NETDEV_UP: |
| 1661 | ret = cxgb4_clip_get(event_dev, | 1659 | ret = cxgb4_clip_get(event_dev, |
| 1662 | (const struct in6_addr *) | 1660 | (const struct in6_addr *) |
| 1663 | ((ifa)->addr.s6_addr)); | 1661 | ((ifa)->addr.s6_addr)); |
| 1664 | if (ret < 0) { | 1662 | if (ret < 0) |
| 1665 | rcu_read_unlock(); | ||
| 1666 | return ret; | 1663 | return ret; |
| 1667 | } | 1664 | |
| 1668 | ret = NOTIFY_OK; | 1665 | ret = NOTIFY_OK; |
| 1669 | break; | 1666 | break; |
| 1670 | 1667 | ||
| @@ -1679,7 +1676,6 @@ static int cxgbi_inet6addr_handler(struct notifier_block *this, | |||
| 1679 | break; | 1676 | break; |
| 1680 | } | 1677 | } |
| 1681 | 1678 | ||
| 1682 | rcu_read_unlock(); | ||
| 1683 | return ret; | 1679 | return ret; |
| 1684 | } | 1680 | } |
| 1685 | 1681 | ||
