mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-14 05:55:17 +00:00
platform/x86: asus-wmi: Refactor charge_threshold_store()
There are few issues with the current code: - the error code from kstrtouint() is shadowed - the error code from asus_wmi_set_devstate() is ignored - the extra check against 0 for count (this is guaranteed by sysfs) Fix these issues by doing a slight refactoring of charge_threshold_store(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
d507a54f58
commit
84d8e80b0a
1 changed files with 5 additions and 3 deletions
Loading…
Add table
Add a link
Reference in a new issue