diff options
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 398ce2c59686..e4028197b75d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1541,8 +1541,10 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) | |||
1541 | int ifidx = nla_get_u32(tb[NL80211_ATTR_IFINDEX]); | 1541 | int ifidx = nla_get_u32(tb[NL80211_ATTR_IFINDEX]); |
1542 | 1542 | ||
1543 | netdev = dev_get_by_index(sock_net(skb->sk), ifidx); | 1543 | netdev = dev_get_by_index(sock_net(skb->sk), ifidx); |
1544 | if (!netdev) | 1544 | if (!netdev) { |
1545 | rtnl_unlock(); | ||
1545 | return -ENODEV; | 1546 | return -ENODEV; |
1547 | } | ||
1546 | if (netdev->ieee80211_ptr) { | 1548 | if (netdev->ieee80211_ptr) { |
1547 | dev = wiphy_to_dev( | 1549 | dev = wiphy_to_dev( |
1548 | netdev->ieee80211_ptr->wiphy); | 1550 | netdev->ieee80211_ptr->wiphy); |
@@ -1586,6 +1588,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) | |||
1586 | !skb->len && | 1588 | !skb->len && |
1587 | cb->min_dump_alloc < 4096) { | 1589 | cb->min_dump_alloc < 4096) { |
1588 | cb->min_dump_alloc = 4096; | 1590 | cb->min_dump_alloc = 4096; |
1591 | rtnl_unlock(); | ||
1589 | return 1; | 1592 | return 1; |
1590 | } | 1593 | } |
1591 | idx--; | 1594 | idx--; |