Linux wireless drivers development
 help / color / mirror / Atom feed
From: Su Hui <suhui@nfschina.com>
To: arend.vanspriel@broadcom.com, kvalo@kernel.org
Cc: Su Hui <suhui@nfschina.com>,
	johannes.berg@intel.com, kees@kernel.org, a@bayrepo.ru,
	marcan@marcan.st, quic_alokad@quicinc.com, zyytlz.wz@163.com,
	petr.tesarik.ext@huawei.com, duoming@zju.edu.cn,
	colin.i.king@gmail.com, frankyl@broadcom.com,
	meuleman@broadcom.com, phaber@broadcom.com,
	linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH wireless 1/9]  wifi: cfg80211: avoid garbage value of 'io_type' in  brcmf_cfg80211_attach()
Date: Tue,  2 Jul 2024 20:24:44 +0800	[thread overview]
Message-ID: <20240702122450.2213833-2-suhui@nfschina.com> (raw)
In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com>

 brcmf_fil_cmd_int_get() reads the value of 'io_type' and passes it to
 brcmf_fil_cmd_data_get(). Initialize 'io_type' to avoid garbage value.

Fixes: 83cf17aa8082 ("brcmfmac: adopt new d11 interface")
Signed-off-by: Su Hui <suhui@nfschina.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 5fe0e671ecb3..6be7e7bd8ce7 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -8249,7 +8249,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
 	struct brcmf_cfg80211_vif *vif;
 	struct brcmf_if *ifp;
 	s32 err = 0;
-	s32 io_type;
+	s32 io_type = 0;
 	u16 *cap = NULL;
 
 	if (!ndev) {
-- 
2.30.2


  reply	other threads:[~2024-07-02 12:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 12:24 [PATCH wireless 0/9] wifi: cfg80211: avoid some garbage values Su Hui
2024-07-02 12:24 ` Su Hui [this message]
2024-07-02 13:57   ` [PATCH wireless 1/9] wifi: cfg80211: avoid garbage value of 'io_type' in brcmf_cfg80211_attach() Dan Carpenter
2024-07-02 15:07     ` Arend Van Spriel
2024-07-02 15:29       ` Kalle Valo
2024-07-02 15:37         ` Dan Carpenter
2024-07-02 16:26           ` Arend Van Spriel
2024-07-02 16:37             ` Dan Carpenter
2024-07-02 15:39         ` Arend Van Spriel
2024-07-03  1:41           ` Su Hui
2024-07-03  4:42             ` Arend Van Spriel
2024-07-03  7:38               ` Su Hui
2024-07-03 13:23               ` Dan Carpenter
2024-07-02 12:24 ` [PATCH wireless 2/9] wifi: brcmfmac: avoid garbage value of 'status' in brcmf_c_download_blob() Su Hui
2024-07-02 12:24 ` [PATCH wireless 3/9] wifi: cfg80211: avoid garbage value of 'noise' in brcmf_cfg80211_dump_survey() Su Hui
2024-07-02 12:24 ` [PATCH wireless 4/9] wifi: cfg80211: avoid garbage value of 'chanspec' in brcmf_cfg80211_get_channel() Su Hui
2024-07-02 12:24 ` [PATCH wireless 5/9] wifi: cfg80211: avoid garbage value of 'freq' in brcmf_cfg80211_mgmt_tx() Su Hui
2024-07-02 12:24 ` [PATCH wireless 6/9] wifi: cfg80211: avoid garbage value of 'wsec' in brcmf_cfg80211_reconfigure_wep() Su Hui
2024-07-02 12:24 ` [PATCH wireless 7/9] wifi: cfg80211: avoid garbage value of 'wsec' in brcmf_cfg80211_add_key() Su Hui
2024-07-02 12:24 ` [PATCH wireless 8/9] wifi: cfg80211: avoid garbage value of 'val' in brcmf_set_key_mgmt() Su Hui
2024-07-02 12:24 ` [PATCH wireless 9/9] wifi: cfg80211: avoid garbage value of 'wsec' in brcmf_cfg80211_{get,config_default}_key() Su Hui
2024-07-02 12:49 ` [PATCH wireless 0/9] wifi: cfg80211: avoid some garbage values Johannes Berg
2024-07-02 14:41   ` Arend Van Spriel
2024-07-02 14:02 ` Jonas Gorski
2024-07-02 15:01   ` Arend Van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240702122450.2213833-2-suhui@nfschina.com \
    --to=suhui@nfschina.com \
    --cc=a@bayrepo.ru \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=colin.i.king@gmail.com \
    --cc=duoming@zju.edu.cn \
    --cc=frankyl@broadcom.com \
    --cc=johannes.berg@intel.com \
    --cc=kees@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=marcan@marcan.st \
    --cc=meuleman@broadcom.com \
    --cc=petr.tesarik.ext@huawei.com \
    --cc=phaber@broadcom.com \
    --cc=quic_alokad@quicinc.com \
    --cc=zyytlz.wz@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox