mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
ath10k: htt_rx: fix signedness bug in ath10k_update_per_peer_tx_stats
Currently, the error handling for the call to function
ath10k_get_legacy_rate_idx() doesn't work because
*rate_idx* is of type u8 (8 bits, unsigned), which
makes it impossible for it to hold a value less
than 0.
Fix this by changing the type of variable *rate_idx*
to s8 (8 bits, signed).
Addresses-Coverity-ID: 1473914 ("Unsigned compared against 0")
Fixes: 0189dbd71c ("ath10k: get the legacy rate index to update the txrate table")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
6bc17950f4
commit
9d9cdbf3f9
1 changed files with 2 additions and 1 deletions
|
|
@ -2753,7 +2753,8 @@ ath10k_update_per_peer_tx_stats(struct ath10k *ar,
|
|||
struct ath10k_per_peer_tx_stats *peer_stats)
|
||||
{
|
||||
struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
|
||||
u8 rate = 0, rate_idx = 0, sgi;
|
||||
u8 rate = 0, sgi;
|
||||
s8 rate_idx = 0;
|
||||
struct rate_info txrate;
|
||||
|
||||
lockdep_assert_held(&ar->data_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue