mfd: ab8500-debugfs: Cleaning up unnecessary to test, unsigned can't be negative.
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sat, 28 Jun 2014 21:34:38 +0000 (23:34 +0200)
committerLee Jones <lee.jones@linaro.org>
Wed, 9 Jul 2014 13:58:22 +0000 (14:58 +0100)
Unsigned variable can't be negative so it is unnecessary to test it

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/ab8500-debugfs.c

index 8452c15..e23fcba 100644 (file)
@@ -2503,7 +2503,7 @@ static ssize_t ab8500_gpadc_trig_timer_write(struct file *file,
        if (err)
                return err;
 
-       if ((user_trig_timer >= 0) && (user_trig_timer <= 255)) {
+       if (user_trig_timer <= 255) {
                trig_timer = (u8) user_trig_timer;
        } else {
                dev_err(dev, "debugfs error input: "