diff options
| author | 2026-10-21 01:09:41 +0900 | |
|---|---|---|
| committer | 2026-11-02 07:00:04 -0800 | |
| commit | e2c26431b4e47892378582a414b4bbaa9edf1798 (patch) | |
| tree | ad1cb3611d736fa7ccdb1e3e2b58498825f367d9 /scripts/Makefile.thinlto | |
| parent | hwmon: (sht15) Stop deferred work before releasing its resources (diff) | |
hwmon: (corsair-cpro) Cache fan target only after a successful command
set_target() updates the cached fan target before sending the command.
If the command fails, subsequent fanN_target reads report the failed
request instead of the previous value. For example, after successfully
setting 1200 RPM, a rejected request for 1800 RPM returns an error but
leaves fanN_target reporting 1800. A failed request also replaces
-ENODATA when no target has been successfully set.
Update the target cache under the existing mutex only after
send_usb_cmd() succeeds, as set_pwm() already does when invalidating
the target. Preserve the previous cached value and return the original
error on failure.
Fixes: 40c3a4454225 ("hwmon: add Corsair Commander Pro driver")
Cc: stable@vger.kernel.org
Signed-off-by: Baek Kyu, Kim <pocj8ur4in@gmail.com>
Link: https://patch.msgid.link/20261020160941.36787-1-pocj8ur4in@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
