From: Johannes Berg Date: Tue, 5 Oct 2010 19:34:11 +0000 (+0200) Subject: nl80211: fix error in generic netif_running check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d537f5fdfcc9c57c1e3b9fb316a4bed2bf7597e7;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: John W. Linville --- 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, } if (ops->internal_flags & NL80211_FLAG_CHECK_NETDEV_UP && !netif_running(dev)) { + cfg80211_unlock_rdev(rdev); + dev_put(dev); if (rtnl) rtnl_unlock(); return -ENETDOWN;