]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: gb-vibrator: remove useless if in timeout_store()
authorBill Pemberton <wfp5p@worldbroken.com>
Fri, 16 Jan 2015 02:18:26 +0000 (21:18 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 16 Jan 2015 19:06:19 +0000 (11:06 -0800)
val is an unsigned long so there is no point in checking if it is less
than zero.

Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/gb-vibrator.c

index c85d95085040d53f16c8b14e11c2834279eea285..b5332df7039caf45913532d47b2df3d27c7154ee 100644 (file)
@@ -100,8 +100,6 @@ static ssize_t timeout_store(struct device *dev, struct device_attribute *attr,
                return retval;
        }
 
-       if (val < 0)
-               return -EINVAL;
        if (val)
                retval = turn_on(vib, (u16)val);
        else