From patchwork Wed Oct 30 05:30:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 3113121 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 02346BF924 for ; Wed, 30 Oct 2013 05:30:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 43243201F4 for ; Wed, 30 Oct 2013 05:30:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E4CE2016A for ; Wed, 30 Oct 2013 05:30:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752090Ab3J3FaJ (ORCPT ); Wed, 30 Oct 2013 01:30:09 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:55557 "EHLO mail-bk0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752012Ab3J3FaI (ORCPT ); Wed, 30 Oct 2013 01:30:08 -0400 Received: by mail-bk0-f44.google.com with SMTP id mx11so277905bkb.31 for ; Tue, 29 Oct 2013 22:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=yuYqElPQ7yMAaTUyHO8JsAAUTBDVvniDXZMsLkauMcc=; b=mpZc4DnYxfAL8jNfwrq8SInxjPNHS608ZrldPhLoz5WfXYECqV0eNeingf4DTgSeXo lzVqAO1ot1mlvJkJByLLoDRw8jvbRPT3dLYl65Jz1gfa/gTgREJUHuMFp6lQ02d2Ii+1 p1a57N4InJodos87DpcSiGp6xYp0jSlRtUCVmtKwMN8XaLezH7mRsRRYR2ztryL34NHW exRH1MUKW1I6vnT0Nx/sVkwu9tVWPzM0PoeDb/945rjBNXqRdVKQkWYNu5fO+KPMCxhl iiRnlHTuSo3ZGuTBVWN51Pivl97xC+CGx6002OHPU0aLeGlMkYFB6gfcHWTPMyfI6Nhl MNiw== MIME-Version: 1.0 X-Received: by 10.205.43.197 with SMTP id ud5mr31280bkb.43.1383111007268; Tue, 29 Oct 2013 22:30:07 -0700 (PDT) Received: by 10.205.19.10 with HTTP; Tue, 29 Oct 2013 22:30:07 -0700 (PDT) Date: Wed, 30 Oct 2013 13:30:07 +0800 Message-ID: Subject: [PATCH -next] wcn36xx: fix missing unlock on error in wcn36xx_smd_update_proberesp_tmpl() From: Wei Yongjun To: k.eugene.e@gmail.com, linville@tuxdriver.com Cc: yongjun_wei@trendmicro.com.cn, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Add the missing unlock before return from function wcn36xx_smd_update_proberesp_tmpl() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/net/wireless/ath/wcn36xx/smd.c | 3 ++- 1 file changed, 2 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/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index f8c3a10..04df70b 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1327,7 +1327,8 @@ int wcn36xx_smd_update_proberesp_tmpl(struct wcn36xx *wcn, if (skb->len > BEACON_TEMPLATE_SIZE) { wcn36xx_warn("probe response template is too big: %d\n", skb->len); - return -E2BIG; + ret = -E2BIG; + goto out; } msg.probe_resp_template_len = skb->len;