public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] mac80211: unlock on error path in ieee80211_ibss_join()
@ 2011-12-08  6:49 Dan Carpenter
  2011-12-08  8:16 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-12-08  6:49 UTC (permalink / raw)
  To: Alexander Simon
  Cc: John W. Linville, Johannes Berg, linux-wireless, kernel-janitors

We recently introduced a new return here but it needs an unlock first.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 3f830ac..0fc9752 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -993,8 +993,10 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
 	if (params->channel_fixed) {
 		sdata->local->oper_channel = params->channel;
 		if (!ieee80211_set_channel_type(sdata->local, sdata,
-					       params->channel_type))
+					       params->channel_type)) {
+			mutex_unlock(&sdata->u.ibss.mtx);
 			return -EINVAL;
+		}
 	}
 
 	if (params->ie) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-08  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08  6:49 [patch] mac80211: unlock on error path in ieee80211_ibss_join() Dan Carpenter
2011-12-08  8:16 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox