summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorXiongfeng Wang <wangxiongfeng2@huawei.com>2020-04-29 11:59:40 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-05-05 15:33:24 +0300
commitf8a31eca47bec197f5ec5dc40ad675450c2058a5 (patch)
treed0c364fd6c09ebf12037892cbc1297afe18d680a /drivers/platform
parent01f259f3720c3965443109d82a0f12611ea8bb58 (diff)
downloadlinux-f8a31eca47bec197f5ec5dc40ad675450c2058a5.tar.xz
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 <hulkci@huawei.com> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-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 8eaadbaf8ffa..0f704484ae1d 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -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;