linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable()
@ 2022-11-13 15:42 Christophe JAILLET
  2022-11-15  0:31 ` Ping-Ke Shih
  2022-11-16  9:33 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2022-11-13 15:42 UTC (permalink / raw)
  To: Ping-Ke Shih, Kalle Valo, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Chin-Yen Lee
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET,
	linux-wireless, netdev

'ret' is not updated after several function calls in rtw89_wow_enable().
This prevent error handling from working.

Add the missing assignments.

Fixes: 19e28c7fcc74 ("wifi: rtw89: add WoWLAN function support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/wireless/realtek/rtw89/wow.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c
index 7de4dd047d6b..b2b826b2e09a 100644
--- a/drivers/net/wireless/realtek/rtw89/wow.c
+++ b/drivers/net/wireless/realtek/rtw89/wow.c
@@ -744,13 +744,13 @@ static int rtw89_wow_enable(struct rtw89_dev *rtwdev)
 		goto out;
 	}
 
-	rtw89_wow_swap_fw(rtwdev, true);
+	ret = rtw89_wow_swap_fw(rtwdev, true);
 	if (ret) {
 		rtw89_err(rtwdev, "wow: failed to swap to wow fw\n");
 		goto out;
 	}
 
-	rtw89_wow_fw_start(rtwdev);
+	ret = rtw89_wow_fw_start(rtwdev);
 	if (ret) {
 		rtw89_err(rtwdev, "wow: failed to let wow fw start\n");
 		goto out;
@@ -758,7 +758,7 @@ static int rtw89_wow_enable(struct rtw89_dev *rtwdev)
 
 	rtw89_wow_enter_lps(rtwdev);
 
-	rtw89_wow_enable_trx_post(rtwdev);
+	ret = rtw89_wow_enable_trx_post(rtwdev);
 	if (ret) {
 		rtw89_err(rtwdev, "wow: failed to enable trx_post\n");
 		goto out;
-- 
2.34.1


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

* RE: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable()
  2022-11-13 15:42 [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable() Christophe JAILLET
@ 2022-11-15  0:31 ` Ping-Ke Shih
  2022-11-16  9:33 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Ping-Ke Shih @ 2022-11-15  0:31 UTC (permalink / raw)
  To: Christophe JAILLET, Kalle Valo, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Timlee
  Cc: linux-kernel, kernel-janitors, linux-wireless, netdev



> -----Original Message-----
> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Sent: Sunday, November 13, 2022 11:42 PM
> To: Ping-Ke Shih <pkshih@realtek.com>; Kalle Valo <kvalo@kernel.org>; David S. Miller <davem@davemloft.net>;
> Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>;
> Timlee <timlee@realtek.com>
> Cc: linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Christophe JAILLET
> <christophe.jaillet@wanadoo.fr>; linux-wireless@vger.kernel.org; netdev@vger.kernel.org
> Subject: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable()
> 
> 'ret' is not updated after several function calls in rtw89_wow_enable().
> This prevent error handling from working.
> 
> Add the missing assignments.
> 
> Fixes: 19e28c7fcc74 ("wifi: rtw89: add WoWLAN function support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

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

Thanks for the fixes.

> ---
>  drivers/net/wireless/realtek/rtw89/wow.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c
> index 7de4dd047d6b..b2b826b2e09a 100644
> --- a/drivers/net/wireless/realtek/rtw89/wow.c
> +++ b/drivers/net/wireless/realtek/rtw89/wow.c
> @@ -744,13 +744,13 @@ static int rtw89_wow_enable(struct rtw89_dev *rtwdev)
>  		goto out;
>  	}
> 
> -	rtw89_wow_swap_fw(rtwdev, true);
> +	ret = rtw89_wow_swap_fw(rtwdev, true);
>  	if (ret) {
>  		rtw89_err(rtwdev, "wow: failed to swap to wow fw\n");
>  		goto out;
>  	}
> 
> -	rtw89_wow_fw_start(rtwdev);
> +	ret = rtw89_wow_fw_start(rtwdev);
>  	if (ret) {
>  		rtw89_err(rtwdev, "wow: failed to let wow fw start\n");
>  		goto out;
> @@ -758,7 +758,7 @@ static int rtw89_wow_enable(struct rtw89_dev *rtwdev)
> 
>  	rtw89_wow_enter_lps(rtwdev);
> 
> -	rtw89_wow_enable_trx_post(rtwdev);
> +	ret = rtw89_wow_enable_trx_post(rtwdev);
>  	if (ret) {
>  		rtw89_err(rtwdev, "wow: failed to enable trx_post\n");
>  		goto out;
> --
> 2.34.1


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

* Re: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable()
  2022-11-13 15:42 [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable() Christophe JAILLET
  2022-11-15  0:31 ` Ping-Ke Shih
@ 2022-11-16  9:33 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2022-11-16  9:33 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Ping-Ke Shih, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Chin-Yen Lee, linux-kernel, kernel-janitors,
	Christophe JAILLET, linux-wireless, netdev

Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:

> 'ret' is not updated after several function calls in rtw89_wow_enable().
> This prevent error handling from working.
> 
> Add the missing assignments.
> 
> Fixes: 19e28c7fcc74 ("wifi: rtw89: add WoWLAN function support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-next.git, thanks.

61ec34dee266 wifi: rtw89: Fix some error handling path in rtw89_wow_enable()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/32320176eeff1c635baeea25ef0e87d116859e65.1668354083.git.christophe.jaillet@wanadoo.fr/

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


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

end of thread, other threads:[~2022-11-16  9:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-13 15:42 [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable() Christophe JAILLET
2022-11-15  0:31 ` Ping-Ke Shih
2022-11-16  9:33 ` 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).