From patchwork Mon Jul 18 23:24:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 9235679 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 9554E6075E for ; Mon, 18 Jul 2016 23:25:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 881CD212CF for ; Mon, 18 Jul 2016 23:25:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D072265F9; Mon, 18 Jul 2016 23:25:00 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham 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 2A029269E2 for ; Mon, 18 Jul 2016 23:25:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752264AbcGRXY7 (ORCPT ); Mon, 18 Jul 2016 19:24:59 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:34359 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217AbcGRXYz (ORCPT ); Mon, 18 Jul 2016 19:24:55 -0400 Received: by mail-pa0-f67.google.com with SMTP id hh10so113707pac.1 for ; Mon, 18 Jul 2016 16:24:55 -0700 (PDT) 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=auPPcFTy3qjuwdAEtXSPOg0Hfl3b+FeF1bDxUbYIO94=; b=0VHf2uoM5FYQkVIIJhuVSEWRBZNi7NRLISSAfiWU0/deHmLkf+3A1x5wYKoh6V0VGw 8797WisEVGmZDRtt8pvkL6Dj67fnQgPYZmW6FAeZx+BkngG4JVPaU+ujGlArpqUCSnku Jml/3Rbu7wnz9EsIVs3ZDMOdqaxiu75jgxirE7eRDe0jDBisTXk5PwDE72+HMDG7lfF0 O2pL7KSEGeJC+QdMKPGXcLWRxN+6nYcsl+TzfkegOjVlhFbmlz8PoitcxIGjtiSZnySu bFkET7KJMe5vYgzdPDyZUZ/n9l6urkx7Zh+ify72id8+Y3V7O6dDynawxBW2cFoPzQw2 XvnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=auPPcFTy3qjuwdAEtXSPOg0Hfl3b+FeF1bDxUbYIO94=; b=OWGYWtCICpd9QJOm6C+xUe36+CmecHRFaHNNp/o082MgWnHzVq588toB9kjAEU4ADp hFS7meFdBGsDRRAPFdhGrEOWu7Kc9GAoPE2htwVdJUtt0K0ljsxy+hP8H394Vrr5Jqdu h3Bd/shYWsGWvx0DqTFnpm+xfDyORyr93O+O6KP01NwfnVVGaAxHYxMOBDioZ1hW6lH6 8uDC+YETfUSpdcUPDHQMcOUUuO9KCpkk9erdXjYV9owDP6kpb3Zeom7oc1nRsj1NwhZB CBkyTDYyyHo4KVhmPVSqoOjqSrSDX9rUcvjd+P97eXvZXjliDXVZO8XNqSgiLjsyFph3 bz1w== X-Gm-Message-State: ALyK8tJ10xf0qJ5rDzEnkrTUnGWo+7uGaVimJW3++2tiO+ZU+n1grxBCFGHzs6brqiVpIQ== X-Received: by 10.66.8.37 with SMTP id o5mr61034057paa.100.1468884294819; Mon, 18 Jul 2016 16:24:54 -0700 (PDT) Received: from fainelli-desktop.broadcom.com (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by smtp.gmail.com with ESMTPSA id dz13sm6934659pac.44.2016.07.18.16.24.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jul 2016 16:24:54 -0700 (PDT) From: Florian Fainelli To: brcm80211-dev-list.pdl@broadcom.com Cc: linux-wireless@vger.kernel.org, pieterpg@broadcom.com, kvalo@codeaurora.org, arend.vanspriel@broadcom.com, hante.meuleman@broadcom.com, Florian Fainelli Subject: [PATCH 4/4] brcmsmac: Initialize power in brcms_c_stf_ss_algo_channel_get() Date: Mon, 18 Jul 2016 16:24:37 -0700 Message-Id: <1468884277-18606-5-git-send-email-f.fainelli@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468884277-18606-1-git-send-email-f.fainelli@gmail.com> References: <1468884277-18606-1-git-send-email-f.fainelli@gmail.com> 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 wlc_phy_txpower_get_current() does a logical OR of power->flags, which presumes that power.flags was initiliazed earlier by the caller, unfortunately, this is not the case, so make sure we zero out the struct tx_power before calling into wlc_phy_txpower_get_current(). Reported-by: coverity (CID 146011) Fixes: 5b435de0d7868 ("net: wireless: add brcm80211 drivers") Signed-off-by: Florian Fainelli Acked-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c index dd9162722495..0ab865de1491 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c @@ -87,7 +87,7 @@ void brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc, u16 *ss_algo_channel, u16 chanspec) { - struct tx_power power; + struct tx_power power = { }; u8 siso_mcs_id, cdd_mcs_id, stbc_mcs_id; /* Clear previous settings */