diff options
| author | Yufei CHENG <cd345al@gmail.com> | 2026-04-27 00:50:34 +0800 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2026-04-30 15:41:18 +0300 |
| commit | 863810d4985ad214f70c1623f24384ccc850f2a2 (patch) | |
| tree | dcd4200ab64f974c5fe6dd9e9fe852a3dd2f7bb8 /scripts/dummy-tools/python3 | |
| parent | c2d4b76458c9ebf81eae2916970320f1f61ad002 (diff) | |
platform/x86: lenovo: wmi-other: Fix uninitialized variable in lwmi_om_hwmon_write()
When the flag relax_fan_constraint is set, local variable 'raw'
is never assigned, and lwmi_om_hwmon_write() will pass uninitialized
value to lwmi_om_fan_get_set() resulting in undefined behavior.
This flag allows user to bypass minimum fan RPM divisor rounding,
but assignment to 'raw' only happens in the non-relaxed path.
Fix by defaulting 'raw' to user provided 'val' in the else branch.
Fixes: 51ed34282f63 ("platform/x86: lenovo-wmi-other: Add HWMON for fan reporting/tuning")
Reviewed-by: Rong Zhang <i@rong.moe>
Signed-off-by: Yufei CHENG <cd345al@gmail.com>
Link: https://patch.msgid.link/20260426165034.9073-1-cd345al@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'scripts/dummy-tools/python3')
0 files changed, 0 insertions, 0 deletions
