From patchwork Thu May 25 00:11:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9747259 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 28F5A60246 for ; Thu, 25 May 2017 00:14:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18FD6205F8 for ; Thu, 25 May 2017 00:14:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B11C26E97; Thu, 25 May 2017 00:14:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 809E8205F8 for ; Thu, 25 May 2017 00:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162327AbdEYAOj (ORCPT ); Wed, 24 May 2017 20:14:39 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:36142 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164701AbdEYALk (ORCPT ); Wed, 24 May 2017 20:11:40 -0400 Received: by mail-pf0-f177.google.com with SMTP id m17so150174973pfg.3 for ; Wed, 24 May 2017 17:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qAnskKNeiQPUcbXpK6XUP4rZvRU5vCWLhzSHISbUx1c=; b=Npnz/GdQH3hEzTXCTSEafWviQzimGcELzYSuz1m5LEHhWQ9jBZbFNxrzuJjc/jYpS2 D/8OiMeaLi/gyj5iJFBITFDYAzCLwbgclyOmMhZj7g9mGSNu/RTbjBsH54MpGNWutPe3 JlNgmEkTlmJJwkNIawEceN2Y1V934l7Dua43E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qAnskKNeiQPUcbXpK6XUP4rZvRU5vCWLhzSHISbUx1c=; b=kJUwOFAUf7fqyp6SKJJUpCI4Q2Qa9A1DdPZ3oz9DWrpa983mb7W+eBdJLkJRWg1956 14GGRkSHjiq87flGSnatKAJrsylJ8GPhqRDA48P9WJR3pUPjOmVMG6g6+Fkj3s64L5jT jDFUpf/Yo/7hZEVgFK2hRUTKguZEq5K923kZyD2Mdrm+lCDBCBMQ+F6KYo0xFeCWucFR BxMOadJl/BoxmBYD4F4B4nMDcFCZs/FrlAN6HbJuyFTyCCNtzGASOcs2EluXj80IOkYh gYvcCe5dCJZ/KufC6fVcgfyPqNFU2nvS2cWf4c/lPzvhusf1gmX0UtJdQfAkU5QrRTGw 6OxA== X-Gm-Message-State: AODbwcDLhi20Xr7d1+LlKDjHsKTLR6ywaTQVfMbvxgv000SZEJYXXwE1 JE0qLdPdt2eXLPK7 X-Received: by 10.98.139.206 with SMTP id e75mr40749037pfl.64.1495671099759; Wed, 24 May 2017 17:11:39 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id s23sm9823692pfg.81.2017.05.24.17.11.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 17:11:39 -0700 (PDT) From: Brian Norris To: Ganapathi Bhat , Nishant Sarmukadam Cc: , Dmitry Torokhov , Amitkumar Karwar , Kalle Valo , linux-wireless@vger.kernel.org, Brian Norris Subject: [PATCH 07/14] mwifiex: fixup init_channel_scan_gap error case Date: Wed, 24 May 2017 17:11:12 -0700 Message-Id: <20170525001119.64791-7-briannorris@chromium.org> X-Mailer: git-send-email 2.13.0.219.gdb65acc882-goog In-Reply-To: <20170525001119.64791-1-briannorris@chromium.org> References: <20170525001119.64791-1-briannorris@chromium.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In reading through _mwifiex_fw_dpc(), I noticed that after we've registered our wiphy, we still have error paths that don't free it back up. Let's do that. Signed-off-by: Brian Norris --- drivers/net/wireless/marvell/mwifiex/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c index be3badba028a..c6cdbc311471 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c @@ -584,7 +584,7 @@ static int _mwifiex_fw_dpc(const struct firmware *firmware, void *context) if (mwifiex_init_channel_scan_gap(adapter)) { mwifiex_dbg(adapter, ERROR, "could not init channel stats table\n"); - goto err_init_fw; + goto err_init_chan_scan; } if (driver_mode) { @@ -632,6 +632,7 @@ static int _mwifiex_fw_dpc(const struct firmware *firmware, void *context) err_add_intf: vfree(adapter->chan_stats); +err_init_chan_scan: wiphy_unregister(adapter->wiphy); wiphy_free(adapter->wiphy); err_init_fw: