Skip to content

Commit f8a31ec

Browse files
fenghusthuandy-shev
authored andcommitted
platform/x86: thinkpad_acpi: Remove always false 'value < 0' statement
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]>
1 parent 01f259f commit f8a31ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9548,7 +9548,7 @@ static ssize_t tpacpi_battery_store(int what,
95489548
if (!battery_info.batteries[battery].start_support)
95499549
return -ENODEV;
95509550
/* valid values are [0, 99] */
9551-
if (value < 0 || value > 99)
9551+
if (value > 99)
95529552
return -EINVAL;
95539553
if (value > battery_info.batteries[battery].charge_stop)
95549554
return -EINVAL;

0 commit comments

Comments
 (0)