aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiongfeng Wang <[email protected]>2020-04-29 16:59:40 +0800
committerAndy Shevchenko <[email protected]>2020-05-05 20:26:16 +0300
commitb991178fe3cb8ab326167da0f74e7f20bbe269cf (patch)
tree70a11f48437760573214bce0dfa8c1e95a4fa652
parent14232c6e788cb1f7b96dbd08b077f90923324b24 (diff)
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]>
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 83b4a83da967..31377629ea57 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -9579,7 +9579,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;