Skip to content
Commit 26bb9340 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo
Browse files

rtw89: handle potential uninitialized variable



The smatch reports:
 rtw8852a.c:1857 rtw8852a_btc_set_wl_txpwr_ctrl() error: uninitialized symbol '_cur'.
 rtw8852a.c:1858 rtw8852a_btc_set_wl_txpwr_ctrl() error: uninitialized symbol '_cur'.

This is because rtw89_mac_txpwr_read32() can possibly return before setting
argument _cur, and the caller will use the uninitialized value. To fix this
problem, check the return value of rtw89_mac_txpwr_read32().

Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220318035202.42437-1-pkshih@realtek.com
parent 84fc6999
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment