From patchwork Fri Nov 8 17:34:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugene Krasnikov X-Patchwork-Id: 3159131 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 80BEB9F489 for ; Fri, 8 Nov 2013 17:35:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 529CB2047B for ; Fri, 8 Nov 2013 17:35:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 31F4820495 for ; Fri, 8 Nov 2013 17:35:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757788Ab3KHRfF (ORCPT ); Fri, 8 Nov 2013 12:35:05 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:39657 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757548Ab3KHRfD (ORCPT ); Fri, 8 Nov 2013 12:35:03 -0500 Received: by mail-wi0-f169.google.com with SMTP id cb5so28581wib.2 for ; Fri, 08 Nov 2013 09:35:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U4Tk3i4reD1BEeHFoa+FuimGw5IXLnNB99WgTRFvA7E=; b=fgcHHk0JlOGEiNU1bSfdkzrxhdP1vq4mFxc70732omoJJ/ZcQWswcxyPyKS9c8PkGC Ryq+fMAEWCAcbcsZTfr1QvOUf2Pu0uElTYPxauCjQWfsXqhX6P8byy/p/vfJo8WjuCqF AF3frCIOgjzUymy6jWOitxd7Bg036YywtGEZDT2Iv7x39fbE46TvsiIFZBrxzgrixpFQ 6Y7+Vd3/cx11hj/fDHKEGDnY0sw21gS82/CIEp/HXaLLk5T4G4ZmNfee8rmX8S3IzCV/ Zs4/J2+LsOa8z88sIVNtMRGryjYmUw5Ewrpfjv1egkREtrcw2U/aM9ztmV/LpTCobBO1 qs3w== X-Received: by 10.180.39.212 with SMTP id r20mr3264110wik.13.1383932101412; Fri, 08 Nov 2013 09:35:01 -0800 (PST) Received: from localhost.localdomain (188.29.165.125.threembb.co.uk. [188.29.165.125]) by mx.google.com with ESMTPSA id w10sm7485105wia.4.2013.11.08.09.34.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Nov 2013 09:35:00 -0800 (PST) From: Eugene Krasnikov To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, wcn36xx@lists.infradead.org, Dan Carpenter Subject: [PATCH 2/3] wcn36xx: missing unlocks on error paths Date: Fri, 8 Nov 2013 17:34:38 +0000 Message-Id: <1383932079-3791-3-git-send-email-k.eugene.e@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1383932079-3791-1-git-send-email-k.eugene.e@gmail.com> References: <1383932079-3791-1-git-send-email-k.eugene.e@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 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: Dan Carpenter There are several places which are missing unlocks. Signed-off-by: Dan Carpenter --- drivers/net/wireless/ath/wcn36xx/smd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 04df70b..de9eb2c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1286,7 +1286,8 @@ int wcn36xx_smd_send_beacon(struct wcn36xx *wcn, struct ieee80211_vif *vif, } else { wcn36xx_err("Beacon is to big: beacon size=%d\n", msg_body.beacon_length); - return -ENOMEM; + ret = -ENOMEM; + goto out; } memcpy(msg_body.bssid, vif->addr, ETH_ALEN); @@ -1607,7 +1608,8 @@ int wcn36xx_smd_keep_alive_req(struct wcn36xx *wcn, /* TODO: it also support ARP response type */ } else { wcn36xx_warn("unknow keep alive packet type %d\n", packet_type); - return -EINVAL; + ret = -EINVAL; + goto out; } PREPARE_HAL_BUF(wcn->hal_buf, msg_body);