aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-10-05 20:56:23 +0200
committerKalle Valo <kvalo@codeaurora.org>2018-10-13 20:23:56 +0300
commit7bfd82bff60ef572b9acef8ca32669ace1f50664 (patch)
tree198a2e198eadd03241cfd7a9e57c571ff4d36d08 /drivers/net/wireless/ath
parentath10k: htt_rx: fix signedness bug in ath10k_update_per_peer_tx_stats (diff)
downloadlinux-dev-7bfd82bff60ef572b9acef8ca32669ace1f50664.tar.xz
linux-dev-7bfd82bff60ef572b9acef8ca32669ace1f50664.zip
ath10k: remove unnecessary comparison of unsigned integer with < 0
There is no need to compare *ps_state_enable* with < 0 because such variable is of type u8 (8 bits, unsigned), making it impossible to hold a negative value. Fix this by removing such comparison. Addresses-Coverity-ID: 1473921 ("Unsigned compared against 0") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath10k/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 2c0cb6757fc6..15964b374f68 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -2421,7 +2421,7 @@ static ssize_t ath10k_write_ps_state_enable(struct file *file,
if (kstrtou8_from_user(user_buf, count, 0, &ps_state_enable))
return -EINVAL;
- if (ps_state_enable > 1 || ps_state_enable < 0)
+ if (ps_state_enable > 1)
return -EINVAL;
mutex_lock(&ar->conf_mutex);