drivers/platform/x86/thinkpad_acpi.c: don't test unsigned int for negativity
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>
Mon, 14 Jul 2014 22:56:21 +0000 (01:56 +0300)
committerMatthew Garrett <matthew.garrett@nebula.com>
Sat, 16 Aug 2014 08:23:51 +0000 (01:23 -0700)
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80231
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/thinkpad_acpi.c

index 0fefb24..61e8ff0 100644 (file)
@@ -6144,7 +6144,7 @@ static int brightness_set(unsigned int value)
 {
        int res;
 
-       if (value > bright_maxlvl || value < 0)
+       if (value > bright_maxlvl)
                return -EINVAL;
 
        vdbg_printk(TPACPI_DBG_BRGHT,