linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] rtw88: coex: fix missing unitialization of variable 'interval'
@ 2020-12-03 17:51 Colin King
  2020-12-04  2:57 ` Pkshih
  2020-12-07 16:35 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2020-12-03 17:51 UTC (permalink / raw)
  To: Yan-Hsuan Chuang, Kalle Valo, David S . Miller, Jakub Kicinski,
	Ping-Ke Shih, Ching-Te Ku, linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Currently the variable 'interval' is not initialized and is only set
to 1 when oex_stat->bt_418_hid_existi is true.  Fix this by inintializing
variable interval to 0 (which I'm assuming is the intended default).

Addresses-Coverity: ("Uninitalized scalar variable")
Fixes: 5b2e9a35e456 ("rtw88: coex: add feature to enhance HID coexistence performance")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/realtek/rtw88/coex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c
index c704c6885a18..24530cafcba7 100644
--- a/drivers/net/wireless/realtek/rtw88/coex.c
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
@@ -2051,7 +2051,7 @@ static void rtw_coex_action_bt_a2dp_hid(struct rtw_dev *rtwdev)
 	struct rtw_coex_dm *coex_dm = &coex->dm;
 	struct rtw_efuse *efuse = &rtwdev->efuse;
 	struct rtw_chip_info *chip = rtwdev->chip;
-	u8 table_case, tdma_case, interval;
+	u8 table_case, tdma_case, interval = 0;
 	u32 slot_type = 0;
 	bool is_toggle_table = false;
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] rtw88: coex: fix missing unitialization of variable 'interval'
  2020-12-03 17:51 [PATCH][next] rtw88: coex: fix missing unitialization of variable 'interval' Colin King
@ 2020-12-04  2:57 ` Pkshih
  2020-12-07 16:35 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Pkshih @ 2020-12-04  2:57 UTC (permalink / raw)
  To: tony0620emma, colin.king, DeanKu, kuba, kvalo, netdev, davem,
	linux-wireless
  Cc: linux-kernel, kernel-janitors

On Thu, 2020-12-03 at 17:51 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently the variable 'interval' is not initialized and is only set
> to 1 when oex_stat->bt_418_hid_existi is true.  Fix this by inintializing
> variable interval to 0 (which I'm assuming is the intended default).
> 
> Addresses-Coverity: ("Uninitalized scalar variable")
> Fixes: 5b2e9a35e456 ("rtw88: coex: add feature to enhance HID coexistence
> performance")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks for your fix.

Acked-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
>  drivers/net/wireless/realtek/rtw88/coex.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/coex.c
> b/drivers/net/wireless/realtek/rtw88/coex.c
> index c704c6885a18..24530cafcba7 100644
> --- a/drivers/net/wireless/realtek/rtw88/coex.c
> +++ b/drivers/net/wireless/realtek/rtw88/coex.c
> @@ -2051,7 +2051,7 @@ static void rtw_coex_action_bt_a2dp_hid(struct rtw_dev
> *rtwdev)
>  	struct rtw_coex_dm *coex_dm = &coex->dm;
>  	struct rtw_efuse *efuse = &rtwdev->efuse;
>  	struct rtw_chip_info *chip = rtwdev->chip;
> -	u8 table_case, tdma_case, interval;
> +	u8 table_case, tdma_case, interval = 0;
>  	u32 slot_type = 0;
>  	bool is_toggle_table = false;
>  
> -- 
> 2.29.2
> 
> 
> ------Please consider the environment before printing this e-mail.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] rtw88: coex: fix missing unitialization of variable 'interval'
  2020-12-03 17:51 [PATCH][next] rtw88: coex: fix missing unitialization of variable 'interval' Colin King
  2020-12-04  2:57 ` Pkshih
@ 2020-12-07 16:35 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2020-12-07 16:35 UTC (permalink / raw)
  To: Colin King
  Cc: Yan-Hsuan Chuang, David S . Miller, Jakub Kicinski, Ping-Ke Shih,
	Ching-Te Ku, linux-wireless, netdev, kernel-janitors,
	linux-kernel

Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently the variable 'interval' is not initialized and is only set
> to 1 when oex_stat->bt_418_hid_existi is true.  Fix this by inintializing
> variable interval to 0 (which I'm assuming is the intended default).
> 
> Addresses-Coverity: ("Uninitalized scalar variable")
> Fixes: 5b2e9a35e456 ("rtw88: coex: add feature to enhance HID coexistence performance")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-drivers-next.git, thanks.

88c15a6fbd94 rtw88: coex: fix missing unitialization of variable 'interval'

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201203175142.1071738-1-colin.king@canonical.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-07 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 17:51 [PATCH][next] rtw88: coex: fix missing unitialization of variable 'interval' Colin King
2020-12-04  2:57 ` Pkshih
2020-12-07 16:35 ` Kalle Valo

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).