diff mbox series

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

Message ID 7b1d82594635e4406d3438f33d8da29eaa056c5a.1668354547.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series wifi: rtw89: Fix some error handling path in rtw89_core_sta_assoc() | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Christophe JAILLET Nov. 13, 2022, 3:49 p.m. UTC
'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 <christophe.jaillet@wanadoo.fr>
---
 drivers/net/wireless/realtek/rtw89/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ping-Ke Shih Nov. 15, 2022, 12:30 a.m. UTC | #1
> -----Original Message-----
> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Sent: Sunday, November 13, 2022 11:49 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>
> 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_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 <christophe.jaillet@wanadoo.fr>

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

> ---
>  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
Kalle Valo Nov. 16, 2022, 9:33 a.m. UTC | #2
Christophe JAILLET <christophe.jaillet@wanadoo.fr> 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 <christophe.jaillet@wanadoo.fr>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-next.git, thanks.

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

Patch

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;