]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86: hp-wmi: fix ignored return values in fan settings
authorEmre Cecanpunar <emreleno@gmail.com>
Tue, 7 Apr 2026 14:25:10 +0000 (17:25 +0300)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 9 Apr 2026 11:46:29 +0000 (14:46 +0300)
commit7265b57fbc32782d02bdb8d865ba0d8efa209c8c
treeebc8eeda205fe421ca88c9f39d3552d5e7fced69
parentec427398794bbc0e294225a094a3060cc4bff19c
platform/x86: hp-wmi: fix ignored return values in fan settings

hp_wmi_get_fan_count_userdefine_trigger() can fail, but its return
value was silently ignored in hp_wmi_apply_fan_settings() for
PWM_MODE_MAX/AUTO. Propagate these errors consistently.

Additionally, handle the return value of hp_wmi_apply_fan_settings()
in its callers by adding appropriate warnings on failure, and remove an
unreachable "return 0" at the end of the function.

Fixes: 46be1453e6e6 ("platform/x86: hp-wmi: add manual fan control for Victus S models")
Signed-off-by: Emre Cecanpunar <emreleno@gmail.com>
Link: https://patch.msgid.link/20260407142515.20683-2-emreleno@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/hp/hp-wmi.c