diff options
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 7dc3343427c1..1cc47aca7f05 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1568,8 +1568,10 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) | |||
1568 | rtnl_lock(); | 1568 | rtnl_lock(); |
1569 | if (!state) { | 1569 | if (!state) { |
1570 | state = kzalloc(sizeof(*state), GFP_KERNEL); | 1570 | state = kzalloc(sizeof(*state), GFP_KERNEL); |
1571 | if (!state) | 1571 | if (!state) { |
1572 | rtnl_unlock(); | ||
1572 | return -ENOMEM; | 1573 | return -ENOMEM; |
1574 | } | ||
1573 | state->filter_wiphy = -1; | 1575 | state->filter_wiphy = -1; |
1574 | ret = nl80211_dump_wiphy_parse(skb, cb, state); | 1576 | ret = nl80211_dump_wiphy_parse(skb, cb, state); |
1575 | if (ret) { | 1577 | if (ret) { |