aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-10-05 15:34:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-06 16:30:41 -0400
commitd537f5fdfcc9c57c1e3b9fb316a4bed2bf7597e7 (patch)
treeb81381e11aad48e7f068b061d037e5ac190a6211 /net/wireless
parente31b82136d1adc7a599b6e99d3321e5831841f5a (diff)
nl80211: fix error in generic netif_running check
Yikes! The error return keeps a netdev reference and the rdev mutex locked, fix that! Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 8826888cc14e..9942f0b061ff 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4418,6 +4418,8 @@ static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb,
4418 } 4418 }
4419 if (ops->internal_flags & NL80211_FLAG_CHECK_NETDEV_UP && 4419 if (ops->internal_flags & NL80211_FLAG_CHECK_NETDEV_UP &&
4420 !netif_running(dev)) { 4420 !netif_running(dev)) {
4421 cfg80211_unlock_rdev(rdev);
4422 dev_put(dev);
4421 if (rtnl) 4423 if (rtnl)
4422 rtnl_unlock(); 4424 rtnl_unlock();
4423 return -ENETDOWN; 4425 return -ENETDOWN;