From: Pkshih <pkshih@realtek.com>
To: Colin King <colin.king@canonical.com>,
Kalle Valo <kvalo@codeaurora.org>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH][next] rtlwifi: rtl8192de: Fix uninitialized variable place
Date: Mon, 30 Aug 2021 02:00:46 +0000 [thread overview]
Message-ID: <9f09efe170cb450aa7a1927af58f005e@realtek.com> (raw)
In-Reply-To: <20210829180503.533934-1-colin.king@canonical.com>
> -----Original Message-----
> From: Colin King [mailto:colin.king@canonical.com]
> Sent: Monday, August 30, 2021 2:05 AM
> To: Pkshih; Kalle Valo; David S . Miller; Jakub Kicinski; linux-wireless@vger.kernel.org;
> netdev@vger.kernel.org
> Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH][next] rtlwifi: rtl8192de: Fix uninitialized variable place
>
> From: Colin Ian King <colin.king@canonical.com>
>
> In the case where chnl <= 14 variable place is not initialized and
> the function returns an uninitialized value. This fixes an earlier
> cleanup where I introduced this bug. My bad.
>
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: 369956ae5720 ("rtlwifi: rtl8192de: Remove redundant variable initializations")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> index 8ae69d914312..b32fa7a75f17 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> @@ -896,7 +896,7 @@ static void _rtl92d_ccxpower_index_check(struct ieee80211_hw *hw,
>
> static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl)
> {
> - u8 place;
> + u8 place = chnl;
>
> if (chnl > 14) {
> for (place = 14; place < sizeof(channel5g); place++) {
Nathan Chancellor has sent a patch [1] to fix this, and the patch
has been merged.
[1] https://patchwork.kernel.org/project/linux-wireless/patch/20210823222014.764557-1-nathan@kernel.org/
--
Ping-Ke
prev parent reply other threads:[~2021-08-30 2:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-29 18:05 [PATCH][next] rtlwifi: rtl8192de: Fix uninitialized variable place Colin King
2021-08-30 2:00 ` Pkshih [this message]
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=9f09efe170cb450aa7a1927af58f005e@realtek.com \
--to=pkshih@realtek.com \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).