Commit f8a31eca authored by Xiongfeng Wang's avatar Xiongfeng Wang Committed by Andy Shevchenko
Browse files

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 01f259f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;