2022-11-13 15:59:22

by Christophe JAILLET

[permalink] [raw]
Subject: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_core_sta_assoc()

'ret' is not updated after a function call in rtw89_core_sta_assoc().
This prevent error handling from working.

Add the missing assignment.

Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver")
Signed-off-by: Christophe JAILLET <[email protected]>
---
drivers/net/wireless/realtek/rtw89/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index e716b96d0f56..f30aadc41f2b 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -2535,7 +2535,7 @@ int rtw89_core_sta_assoc(struct rtw89_dev *rtwdev,
}

/* update cam aid mac_id net_type */
- rtw89_fw_h2c_cam(rtwdev, rtwvif, rtwsta, NULL);
+ ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, rtwsta, NULL);
if (ret) {
rtw89_warn(rtwdev, "failed to send h2c cam\n");
return ret;
--
2.34.1



2022-11-15 01:02:01

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_core_sta_assoc()



> -----Original Message-----
> From: Christophe JAILLET <[email protected]>
> Sent: Sunday, November 13, 2022 11:49 PM
> To: Ping-Ke Shih <[email protected]>; Kalle Valo <[email protected]>; David S. Miller <[email protected]>;
> Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>
> Cc: [email protected]; [email protected]; Christophe JAILLET
> <[email protected]>; [email protected]; [email protected]
> Subject: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_core_sta_assoc()
>
> 'ret' is not updated after a function call in rtw89_core_sta_assoc().
> This prevent error handling from working.
>
> Add the missing assignment.
>
> Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver")
> Signed-off-by: Christophe JAILLET <[email protected]>

Acked-by: Ping-Ke Shih <[email protected]>

> ---
> drivers/net/wireless/realtek/rtw89/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
> index e716b96d0f56..f30aadc41f2b 100644
> --- a/drivers/net/wireless/realtek/rtw89/core.c
> +++ b/drivers/net/wireless/realtek/rtw89/core.c
> @@ -2535,7 +2535,7 @@ int rtw89_core_sta_assoc(struct rtw89_dev *rtwdev,
> }
>
> /* update cam aid mac_id net_type */
> - rtw89_fw_h2c_cam(rtwdev, rtwvif, rtwsta, NULL);
> + ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, rtwsta, NULL);
> if (ret) {
> rtw89_warn(rtwdev, "failed to send h2c cam\n");
> return ret;
> --
> 2.34.1


2022-11-16 09:38:49

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_core_sta_assoc()

Christophe JAILLET <[email protected]> wrote:

> 'ret' is not updated after a function call in rtw89_core_sta_assoc().
> This prevent error handling from working.
>
> Add the missing assignment.
>
> Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver")
> Signed-off-by: Christophe JAILLET <[email protected]>
> Acked-by: Ping-Ke Shih <[email protected]>

Patch applied to wireless-next.git, thanks.

81c0b8928437 wifi: rtw89: Fix some error handling path in rtw89_core_sta_assoc()

--
https://patchwork.kernel.org/project/linux-wireless/patch/7b1d82594635e4406d3438f33d8da29eaa056c5a.1668354547.git.christophe.jaillet@wanadoo.fr/

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