brcmfmac: fix missing unlock on error in brcmf_notify_vif_event()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 22 Feb 2013 13:32:20 +0000 (21:32 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 22 Feb 2013 19:50:47 +0000 (14:50 -0500)
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>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

index cecc3eff72e976a2adba29ffb291bd60c928cf7a..2af9c0f0798d9e5cc2e484b0599a7d50aede68e5 100644 (file)
@@ -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;