mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
platform/x86: asus-wmi: Fix condition in charge_threshold_store()
This error handling is reversed so we return early.
Fixes: 84d8e80b0a ("platform/x86: asus-wmi: Refactor charge_threshold_store()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
109e8adfbc
commit
07779c33a7
1 changed files with 1 additions and 1 deletions
|
|
@ -2068,7 +2068,7 @@ static ssize_t charge_threshold_store(struct device *dev,
|
|||
return -EINVAL;
|
||||
|
||||
ret = asus_wmi_set_devstate(ASUS_WMI_CHARGE_THRESHOLD, value, &rv);
|
||||
if (!ret)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (rv != 1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue