* [PATCH] rtw89: don't kick off TX DMA if failed to write skb
@ 2021-12-01 9:38 Ping-Ke Shih
2021-12-08 18:31 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Ping-Ke Shih @ 2021-12-01 9:38 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, dan.carpenter
This is found by Smatch static checker warning:
drivers/net/wireless/realtek/rtw89/mac80211.c:31 rtw89_ops_tx()
error: uninitialized symbol 'qsel'.
The warning is because 'qsel' isn't filled by rtw89_core_tx_write() due to
failed to write. The way to fix it is to avoid kicking off TX DMA, so add
'return' to the failure case.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/mac80211.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
index 16dc6fb7dbb0b..e9d61e55e2d92 100644
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
@@ -27,6 +27,7 @@ static void rtw89_ops_tx(struct ieee80211_hw *hw,
if (ret) {
rtw89_err(rtwdev, "failed to transmit skb: %d\n", ret);
ieee80211_free_txskb(hw, skb);
+ return;
}
rtw89_core_tx_kick_off(rtwdev, qsel);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtw89: don't kick off TX DMA if failed to write skb
2021-12-01 9:38 [PATCH] rtw89: don't kick off TX DMA if failed to write skb Ping-Ke Shih
@ 2021-12-08 18:31 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-12-08 18:31 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: kvalo, linux-wireless, dan.carpenter
Ping-Ke Shih <pkshih@realtek.com> wrote:
> This is found by Smatch static checker warning:
> drivers/net/wireless/realtek/rtw89/mac80211.c:31 rtw89_ops_tx()
> error: uninitialized symbol 'qsel'.
>
> The warning is because 'qsel' isn't filled by rtw89_core_tx_write() due to
> failed to write. The way to fix it is to avoid kicking off TX DMA, so add
> 'return' to the failure case.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Patch applied to wireless-drivers-next.git, thanks.
a58fdb7c843a rtw89: don't kick off TX DMA if failed to write skb
--
https://patchwork.kernel.org/project/linux-wireless/patch/20211201093816.13806-1-pkshih@realtek.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-08 18:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 9:38 [PATCH] rtw89: don't kick off TX DMA if failed to write skb Ping-Ke Shih
2021-12-08 18:31 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.