]> Git Repo - linux.git/commitdiff
platform/x86: thinkpad_acpi: Remove always false 'value < 0' statement
authorXiongfeng Wang <[email protected]>
Wed, 29 Apr 2020 08:59:40 +0000 (16:59 +0800)
committerAndy Shevchenko <[email protected]>
Tue, 5 May 2020 12:33:24 +0000 (15:33 +0300)
Since 'value' is declared as unsigned long, the following statement is
always false.
value < 0

So let's remove it.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Xiongfeng Wang <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
drivers/platform/x86/thinkpad_acpi.c

index 8eaadbaf8ffa5281d6db62f9f9152c783e0c69c8..0f704484ae1d6b7a4d6fc7abb08fb3f268d1dce1 100644 (file)
@@ -9548,7 +9548,7 @@ static ssize_t tpacpi_battery_store(int what,
                if (!battery_info.batteries[battery].start_support)
                        return -ENODEV;
                /* valid values are [0, 99] */
-               if (value < 0 || value > 99)
+               if (value > 99)
                        return -EINVAL;
                if (value > battery_info.batteries[battery].charge_stop)
                        return -EINVAL;
This page took 0.052269 seconds and 4 git commands to generate.