From patchwork Fri Feb 22 13:32:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2176071 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EC5D4DFABD for ; Fri, 22 Feb 2013 13:32:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757249Ab3BVNcW (ORCPT ); Fri, 22 Feb 2013 08:32:22 -0500 Received: from mail-bk0-f52.google.com ([209.85.214.52]:58766 "EHLO mail-bk0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756723Ab3BVNcW (ORCPT ); Fri, 22 Feb 2013 08:32:22 -0500 Received: by mail-bk0-f52.google.com with SMTP id jk13so291450bkc.11 for ; Fri, 22 Feb 2013 05:32:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=hGmud4BpDrvkib9OeNyB9ERmklmH6kDlpMB9iYCRDFA=; b=FXsU31chGs9cMFF94tBXq6VLuT4zO52qYdtvCdhHrPzdKtiJ/gLMI05EGPRGLLB2Fw YXohcZyJ9+9NXFrKPkHGNBGFjEksbz8W7HiJePHVrMs/S3rtyRhNqgsSiILiokjSotcr QD3IZPEsLoy/mClzstVF0Bnk0RIaeu0vheLYSC2DvFEdour7D5UsSejuzhVt4xPZqLWp 9mN+Z42Np43uMl5jDl8EfSoMcbN54tW93muUUyrnJsJqWkShhR0RtAu5Rww5LJ0qozKS ebIf1trOqA4IKQMfB29Mnd2Ebfuq8lbSWhRurrGc0iJeR4d9OI9jJLzbBsSgAxIJPCAy uHUg== MIME-Version: 1.0 X-Received: by 10.205.133.1 with SMTP id hw1mr1023933bkc.58.1361539940942; Fri, 22 Feb 2013 05:32:20 -0800 (PST) Received: by 10.204.30.210 with HTTP; Fri, 22 Feb 2013 05:32:20 -0800 (PST) Date: Fri, 22 Feb 2013 21:32:20 +0800 Message-ID: Subject: [PATCH -next] brcmfmac: fix missing unlock on error in brcmf_notify_vif_event() From: Wei Yongjun To: brudley@broadcom.com, arend@broadcom.com, meuleman@broadcom.com, linville@tuxdriver.com Cc: yongjun_wei@trendmicro.com.cn, linux-wireless@vger.kernel.org, brcm80211-dev-list@broadcom.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wei Yongjun Add the missing unlock before return from function brcmf_notify_vif_event() in the error handling case. Signed-off-by: Wei Yongjun Reported-by: Dan Carpenter Acked-by: Arend van Spriel --- drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;