summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/debug.c
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/ath10k/debug.c
parent9d9cdbf3f9edbcc0d4f2b4d17f3329315c5f84ad (diff)
downloadlinux-7bfd82bff60ef572b9acef8ca32669ace1f50664.tar.bz2
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/ath10k/debug.c')
-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);