ath9k: debug: Remove redundant check
authorChristos Gkekas <chris.gekas@gmail.com>
Fri, 27 Oct 2017 08:12:37 +0000 (11:12 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 27 Oct 2017 13:50:20 +0000 (16:50 +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/ath9k/debug.c

index 5a0a05abd51a9f1bcb86ccd5ce9ae16a5bfa8188..9e8aed5c478cb87ff846f0da74ff6ba1b70865bd 100644 (file)
@@ -1167,7 +1167,7 @@ static ssize_t write_file_tpc(struct file *file, const char __user *user_buf,
        if (kstrtoul(buf, 0, &val))
                return -EINVAL;
 
-       if (val < 0 || val > 1)
+       if (val > 1)
                return -EINVAL;
 
        tpc_enabled = !!val;