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>
This commit is contained in:
parent
01f259f372
commit
f8a31eca47
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue