OSDN Git Service

ath10k: spectral: remove redundant check in write_file_spectral_count()
authorChristos Gkekas <chris.gekas@gmail.com>
Fri, 27 Oct 2017 08:12:35 +0000 (11:12 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 27 Oct 2017 13:48:50 +0000 (16:48 +0300)
Variable val is unsigned, so checking whether it is less than zero is
redundant.

Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/spectral.c

index dd9cc09..2048b1e 100644 (file)
@@ -406,7 +406,7 @@ static ssize_t write_file_spectral_count(struct file *file,
        if (kstrtoul(buf, 0, &val))
                return -EINVAL;
 
-       if (val < 0 || val > 255)
+       if (val > 255)
                return -EINVAL;
 
        mutex_lock(&ar->conf_mutex);