forked from Minki/linux
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
14232c6e78
commit
b991178fe3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user