提交 a58fdb7c 编写于 作者: P Ping-Ke Shih 提交者: Kalle Valo

rtw89: don't kick off TX DMA if failed to write skb

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: NKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211201093816.13806-1-pkshih@realtek.com
上级 c2258b29
...@@ -27,6 +27,7 @@ static void rtw89_ops_tx(struct ieee80211_hw *hw, ...@@ -27,6 +27,7 @@ static void rtw89_ops_tx(struct ieee80211_hw *hw,
if (ret) { if (ret) {
rtw89_err(rtwdev, "failed to transmit skb: %d\n", ret); rtw89_err(rtwdev, "failed to transmit skb: %d\n", ret);
ieee80211_free_txskb(hw, skb); ieee80211_free_txskb(hw, skb);
return;
} }
rtw89_core_tx_kick_off(rtwdev, qsel); rtw89_core_tx_kick_off(rtwdev, qsel);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册