]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: fan: Use platform device for devres-related actions
authorArmin Wolf <W_Armin@gmx.de>
Tue, 7 Oct 2025 23:41:46 +0000 (01:41 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 24 Oct 2025 08:29:29 +0000 (10:29 +0200)
commitd91a1d129b63614fa4c2e45e60918409ce36db7e
treefff38acadd4ab9f80a91f90c3e602d2c1ae6e6ff
parent58764259ebe0c9efd569194444629f6b26f86583
ACPI: fan: Use platform device for devres-related actions

Device-managed resources are cleaned up when the driver unbinds from
the underlying device. In our case this is the platform device as this
driver is a platform driver. Registering device-managed resources on
the associated ACPI device will thus result in a resource leak when
this driver unbinds.

Ensure that any device-managed resources are only registered on the
platform device to ensure that they are cleaned up during removal.

Fixes: 35c50d853adc ("ACPI: fan: Add hwmon support")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Cc: 6.11+ <stable@vger.kernel.org> # 6.11+
Link: https://patch.msgid.link/20251007234149.2769-4-W_Armin@gmx.de
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/fan.h
drivers/acpi/fan_core.c
drivers/acpi/fan_hwmon.c