Skip to content

Commit

Permalink
brcmfmac: fix missing unlock on error in brcmf_notify_vif_event()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and John W. Linville committed Feb 22, 2013
1 parent 48f4d91 commit dc4a787
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dc4a787

Please sign in to comment.