linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] brcmfmac: fix missing unlock on error in brcmf_notify_vif_event()
@ 2013-02-22 13:32 Wei Yongjun
  2013-02-22 13:50 ` Arend van Spriel
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-02-22 13:32 UTC (permalink / raw)
  To: brudley, arend, meuleman, linville
  Cc: yongjun_wei, linux-wireless, brcm80211-dev-list

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Add the missing unlock before return from function brcmf_notify_vif_event()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index cecc3ef..2af9c0f 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -4615,8 +4615,10 @@ static s32 brcmf_notify_vif_event(struct brcmf_if *ifp,
 	switch (ifevent->action) {
 	case BRCMF_E_IF_ADD:
 		/* waiting process may have timed out */
-		if (!cfg->vif_event.vif)
+		if (!cfg->vif_event.vif) {
+			mutex_unlock(&event->vif_event_lock);
 			return -EBADF;
+		}
 
 		ifp->vif = vif;
 		vif->ifp = ifp;



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

end of thread, other threads:[~2013-02-25  1:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-22 13:32 [PATCH -next] brcmfmac: fix missing unlock on error in brcmf_notify_vif_event() Wei Yongjun
2013-02-22 13:50 ` Arend van Spriel
2013-02-25  1:19   ` [PATCH -next v2] " Wei Yongjun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).