From fb03c5eb8c0bbf4561cb5aa72e0a9546e9574661 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 8 Dec 2011 09:49:03 +0300 Subject: [PATCH] mac80211: unlock on error path in ieee80211_ibss_join() We recently introduced a new return here but it needs an unlock first. Signed-off-by: Dan Carpenter Signed-off-by: John W. Linville --- net/mac80211/ibss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 3f830ac159e5..0fc9752facea 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) {