|
|
56e3f4 |
From b80a31f2d8debd7681d141b03ce167701549be4f Mon Sep 17 00:00:00 2001
|
|
|
56e3f4 |
From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= <ihuguet@redhat.com>
|
|
|
56e3f4 |
Date: Fri, 21 Jan 2022 08:49:03 +0100
|
|
|
56e3f4 |
Subject: [PATCH 25/36] rtw89: don't kick off TX DMA if failed to write skb
|
|
|
56e3f4 |
MIME-Version: 1.0
|
|
|
56e3f4 |
Content-Type: text/plain; charset=UTF-8
|
|
|
56e3f4 |
Content-Transfer-Encoding: 8bit
|
|
|
56e3f4 |
|
|
|
56e3f4 |
Bugzilla: http://bugzilla.redhat.com/2033291
|
|
|
56e3f4 |
|
|
|
56e3f4 |
commit a58fdb7c843a37d6598204c6513961feefdadc6a
|
|
|
56e3f4 |
Author: Ping-Ke Shih <pkshih@realtek.com>
|
|
|
56e3f4 |
Date: Wed Dec 1 17:38:16 2021 +0800
|
|
|
56e3f4 |
|
|
|
56e3f4 |
rtw89: don't kick off TX DMA if failed to write skb
|
|
|
56e3f4 |
|
|
|
56e3f4 |
This is found by Smatch static checker warning:
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/mac80211.c:31 rtw89_ops_tx()
|
|
|
56e3f4 |
error: uninitialized symbol 'qsel'.
|
|
|
56e3f4 |
|
|
|
56e3f4 |
The warning is because 'qsel' isn't filled by rtw89_core_tx_write() due to
|
|
|
56e3f4 |
failed to write. The way to fix it is to avoid kicking off TX DMA, so add
|
|
|
56e3f4 |
'return' to the failure case.
|
|
|
56e3f4 |
|
|
|
56e3f4 |
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
|
|
|
56e3f4 |
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
|
|
56e3f4 |
Signed-off-by: Kalle Valo <kvalo@kernel.org>
|
|
|
56e3f4 |
Link: https://lore.kernel.org/r/20211201093816.13806-1-pkshih@realtek.com
|
|
|
56e3f4 |
|
|
|
56e3f4 |
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
|
|
|
56e3f4 |
---
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/mac80211.c | 1 +
|
|
|
56e3f4 |
1 file changed, 1 insertion(+)
|
|
|
56e3f4 |
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
|
|
|
56e3f4 |
index 757685de6b07..a322259f4cc4 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
|
|
|
56e3f4 |
@@ -27,6 +27,7 @@ static void rtw89_ops_tx(struct ieee80211_hw *hw,
|
|
|
56e3f4 |
if (ret) {
|
|
|
56e3f4 |
rtw89_err(rtwdev, "failed to transmit skb: %d\n", ret);
|
|
|
56e3f4 |
ieee80211_free_txskb(hw, skb);
|
|
|
56e3f4 |
+ return;
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
rtw89_core_tx_kick_off(rtwdev, qsel);
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
--
|
|
|
56e3f4 |
2.13.6
|
|
|
56e3f4 |
|