linux/drivers/platform/x86
Yufei CHENG 863810d498
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: 51ed34282f ("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>
2026-04-30 15:41:18 +03:00
..
amd platform/x86/amd: pmc: Add Thinkpad L14 Gen3 to quirk_s2idle_bug 2026-03-27 13:31:15 +02:00
dell platform/wmi: Replace .no_notify_data with .min_event_size 2026-04-13 14:11:27 +03:00
hp platform/x86: hp-wmi: silence unknown board warning for 8D41 2026-04-30 15:36:19 +03:00
intel platform-drivers-x86 for v7.1-1 2026-04-20 12:02:24 -07:00
lenovo platform/x86: lenovo: wmi-other: Fix uninitialized variable in lwmi_om_hwmon_write() 2026-04-30 15:41:18 +03:00
siemens platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
tuxedo platform/x86/tuxedo: Prevent invalid Kconfig state 2025-05-14 13:01:28 +03:00
uniwill platform/wmi: Replace .no_notify_data with .min_event_size 2026-04-13 14:11:27 +03:00
x86-android-tablets Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
acer-wireless.c platform/x86: acer-wireless: Convert ACPI driver to a platform one 2026-03-09 15:09:01 +02:00
acer-wmi.c platform/x86: acer-wmi: Fix missing capability check 2026-01-20 17:10:56 +02:00
acerhdf.c thermal/drivers/acerhdf: Constify struct thermal_zone_device_ops 2025-05-26 15:31:27 +03:00
adv_swbutton.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
amilo-rfkill.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
apple-gmux.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
asus-armoury.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
asus-armoury.h platform/x86: asus-armoury: add support for GU605MU 2026-03-31 17:22:28 +03:00
asus-laptop.c platform/x86: asus-laptop: Convert ACPI driver to a platform one 2026-04-07 12:41:41 +03:00
asus-nb-wmi.c platform/x86: asus-nb-wmi: add DMI quirk for ASUS ROG Flow Z13-KJP GZ302EAC 2026-03-23 14:49:03 +02:00
asus-tf103c-dock.c irqdomain: platform/x86: Switch to irq_domain_create_linear() 2025-03-21 17:47:56 +02:00
asus-wireless.c platform/x86: asus-wireless: Convert ACPI driver to a platform one 2026-04-07 12:41:44 +03:00
asus-wmi.c platform/x86: asus-wmi: fix screenpad brightness range 2026-03-31 16:00:55 +03:00
asus-wmi.h platform/x86: asus-wmi: Fix ROG button mapping, tablet mode on ASUS ROG Z13 2025-08-25 14:13:55 +03:00
ayaneo-ec.c platform/x86: ayaneo-ec: Add suspend hook 2025-11-21 17:36:22 +02:00
barco-p50-gpio.c platform/x86: barco-p50-gpio: convert to guard() notation 2026-03-23 12:12:05 +02:00
bitland-mifs-wmi.c platform/wmi: Replace .no_notify_data with .min_event_size 2026-04-13 14:11:27 +03:00
classmate-laptop.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
compal-laptop.c platform/x86: compal-laptop: Do not include <linux/fb.h> 2025-02-03 14:59:04 +02:00
dasharo-acpi.c platform/x86: Introduce dasharo-acpi platform driver 2025-05-08 16:03:18 +03:00
dual_accel_detect.h
eeepc-laptop.c platform/x86: eeepc-laptop: Convert ACPI driver to a platform one 2026-03-09 15:29:59 +02:00
eeepc-wmi.c
firmware_attributes_class.c platform/x86: firmware_attributes_class: Drop lifecycle functions 2025-01-09 13:40:27 +02:00
firmware_attributes_class.h platform/x86: firmware_attributes_class: Drop lifecycle functions 2025-01-09 13:40:27 +02:00
fujitsu-laptop.c platform/x86: fujitsu: Convert laptop driver to a platform one 2026-03-18 14:06:06 +02:00
fujitsu-tablet.c platform/x86: fujitsu-tablet: Convert ACPI driver to a platform one 2026-03-18 14:05:59 +02:00
gigabyte-wmi.c MAINTAINERS: consistently use my dedicated email address 2025-04-01 14:21:02 +03:00
gpd-pocket-fan.c platform: x86: replace use of system_wq with system_percpu_wq 2025-11-28 12:07:00 +02:00
hdaps.c
huawei-wmi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ibm_rtl.c platform/x86: ibm_rtl: fix EBDA signature search pointer arithmetic 2025-12-22 16:19:19 +02:00
inspur_platform_profile.c ACPI: platform_profile: Remove platform_profile_handler from exported symbols 2025-01-17 19:15:59 +02:00
intel_ips.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
intel_ips.h
intel_scu_ipc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_scu_ipcutil.c
intel_scu_pcidrv.c
intel_scu_pltdrv.c
intel_scu_wdt.c
Kconfig platform/x86: bitland-mifs-wmi: Add new Bitland MIFS WMI driver 2026-03-24 15:03:09 +02:00
lg-laptop.c platform/x86: lg-laptop: Convert ACPI driver to a platform one 2026-03-17 19:20:46 +02:00
Makefile platform/x86: bitland-mifs-wmi: Add new Bitland MIFS WMI driver 2026-03-24 15:03:09 +02:00
meegopad_anx7428.c
meraki-mx100.c platform/x86: meraki-mx100: Use static device properties 2025-09-26 14:26:46 +03:00
msi-ec.c
msi-ec.h
msi-laptop.c platform/x86: msi-laptop: add missing sysfs_remove_group() 2025-12-22 16:17:49 +02:00
msi-wmi-platform.c platform/x86: msi-wmi-platform: Fix typo in WMI GUID 2025-11-10 19:13:29 +02:00
msi-wmi.c
mxm-wmi.c platform: x86: remove unnecessary module_init/exit() functions 2026-03-02 15:30:46 +02:00
nvidia-wmi-ec-backlight.c
oxpec.c platform/x86: oxpec: Add support for Aokzoe A2 Pro 2026-02-27 13:09:47 +02:00
p2sb.c p2sb: Do not scan and remove the P2SB device when it is unhidden 2024-12-10 16:24:51 +02:00
panasonic-laptop.c platform/x86: panasonic-laptop: Convert ACPI driver to a platform one 2026-03-23 11:33:59 +02:00
pcengines-apuv2.c platform/x86: pcengines-apuv2: attach software node to the gpiochip 2026-03-02 18:27:22 +02:00
pmc_atom.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
portwell-ec.c platform/x86: portwell-ec: Add hwmon support for voltage and temperature 2025-09-16 12:26:39 +03:00
quickstart.c platform/x86: quickstart: Use devm_mutex_init() 2025-09-08 13:13:41 +03:00
redmi-wmi.c platform/wmi: Replace .no_notify_data with .min_event_size 2026-04-13 14:11:27 +03:00
samsung-galaxybook.c platform/x86: samsung-galaxybook: Fix problematic pointer cast 2025-12-29 12:55:50 +02:00
samsung-laptop.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
samsung-q10.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
sel3350-platform.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
serdev_helpers.h platform/x86: serdev_helpers: Add get_serdev_controller_from_parent() helper 2024-12-10 15:17:48 +02:00
serial-multi-instantiate.c platform/x86: serial-multi-instantiate: Add IRQ_RESOURCE_OPT for IRQ missing projects 2025-11-27 11:50:57 +02:00
silicom-platform.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
sony-laptop.c platform/x86: sony-laptop: Convert PIC driver to a platform one 2026-03-17 19:40:02 +02:00
system76_acpi.c platform/x86: system76: Convert ACPI driver to a platform one 2026-03-23 11:37:18 +02:00
topstar-laptop.c platform/x86: topstar-laptop: Convert ACPI driver to a platform one 2026-03-17 19:50:10 +02:00
toshiba_acpi.c platform/x86: toshiba_acpi: Convert ACPI driver to a platform one 2026-03-31 19:14:27 +03:00
toshiba_bluetooth.c platform/x86: toshiba_bluetooth: Convert ACPI driver to a platform one 2026-03-31 19:14:31 +03:00
toshiba_haps.c platform/x86: toshiba_haps: Convert ACPI driver to a platform one 2026-03-31 19:14:35 +03:00
toshiba-wmi.c
touchscreen_dmi.c platform/x86: touchscreen_dmi: Add quirk for y-inverted Goodix touchscreen on SUPI S10 2026-02-23 16:27:22 +02:00
uv_sysfs.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
winmate-fm07-keys.c
wireless-hotkey.c platform/x86: wireless-hotkey: Convert ACPI driver to a platform one 2026-03-17 19:51:49 +02:00
wmi-bmof.c platform/wmi: Extend wmidev_query_block() to reject undersized data 2026-04-13 14:11:25 +03:00
xiaomi-wmi.c platform/wmi: Replace .no_notify_data with .min_event_size 2026-04-13 14:11:27 +03:00
xo1-rfkill.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
xo15-ebook.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00