aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-10-05 14:56:23 -0400
committerKalle Valo <kvalo@codeaurora.org>2018-10-13 13:23:56 -0400
commit7bfd82bff60ef572b9acef8ca32669ace1f50664 (patch)
tree198a2e198eadd03241cfd7a9e57c571ff4d36d08 /drivers/net/wireless
parent9d9cdbf3f9edbcc0d4f2b4d17f3329315c5f84ad (diff)
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')
-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,
2421 if (kstrtou8_from_user(user_buf, count, 0, &ps_state_enable)) 2421 if (kstrtou8_from_user(user_buf, count, 0, &ps_state_enable))
2422 return -EINVAL; 2422 return -EINVAL;
2423 2423
2424 if (ps_state_enable > 1 || ps_state_enable < 0) 2424 if (ps_state_enable > 1)
2425 return -EINVAL; 2425 return -EINVAL;
2426 2426
2427 mutex_lock(&ar->conf_mutex); 2427 mutex_lock(&ar->conf_mutex);