mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
qcacmn: Initialize txpower to 0
In the API reg_find_txpower_from_6g_list, if the frequency is not found, txpower is not touched and could cause undefined behavior. Initialize it to 0. Change-Id: Ic65c678144bf88959407ef28ab0d401278fa4738 CRs-fixed: 2855200
This commit is contained in:
parent
ee9bbf9dfc
commit
51269e38f7
1 changed files with 2 additions and 0 deletions
|
|
@ -4337,6 +4337,8 @@ reg_find_txpower_from_6g_list(qdf_freq_t freq,
|
|||
{
|
||||
enum channel_enum chan_enum;
|
||||
|
||||
*txpower = 0;
|
||||
|
||||
for (chan_enum = 0; chan_enum < NUM_6GHZ_CHANNELS; chan_enum++) {
|
||||
if (chan_list[chan_enum].center_freq == freq) {
|
||||
*txpower = chan_list[chan_enum].tx_power;
|
||||
|
|
|
|||
Loading…
Reference in a new issue