diff options
author | Andrey Utkin <andrey.krieger.utkin@gmail.com> | 2014-07-15 01:56:21 +0300 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2014-08-16 01:23:51 -0700 |
commit | bd3c7b9ef7ff26d541393e6c3e985b1c72c277c3 (patch) | |
tree | 7657ee9b001249c3275456c4da486ad255ef1b22 /drivers/platform/x86/thinkpad_acpi.c | |
parent | 22ba58c8abea9e948d406776b9252024a30bd45c (diff) | |
download | blackbird-op-linux-bd3c7b9ef7ff26d541393e6c3e985b1c72c277c3.tar.gz blackbird-op-linux-bd3c7b9ef7ff26d541393e6c3e985b1c72c277c3.zip |
drivers/platform/x86/thinkpad_acpi.c: don't test unsigned int for negativity
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>
Diffstat (limited to 'drivers/platform/x86/thinkpad_acpi.c')
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 0fefb2420073..61e8ff020256 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -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, |