brcmfmac: fix missing unlock on error in brcmf_notify_vif_event()

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>
This commit is contained in:
Wei Yongjun 2013-02-22 21:32:20 +08:00 committed by John W. Linville
parent 48f4d91679
commit dc4a787c8f
1 changed files with 3 additions and 1 deletions

View 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;