diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-09-11 15:00:51 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-09-12 20:09:46 +0200 |
| commit | 2cf65d00347005eccf9a24801783377d7f920021 (patch) | |
| tree | cace0003e00085c8f71c13f428cfdd35915cc760 /include/linux/timerqueue.h | |
| parent | df2908090cda368b01ff43709f51890076c56157 (diff) | |
ACPI: fan: Fix memory leak due to leftover devm_kcalloc() argument
An ACPI device object's dev field in passed as the first argument to
devm_kcalloc() in acpi_fan_get_fps() which is incorrect and leads to
a memory leak on driver probe errors and removal because the driver
is not bound to that ACPI device.
Address this by replacing that pointer with a pointer to the device the
driver is actually bound to.
While at it, drop a redundant error message after a memory allocation
failure (that also gets printed relative to the ACPI device).
Fixes: d91a1d129b63 ("ACPI: fan: Use platform device for devres-related actions")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/14089663.uLZWGnKmhe@rafael.j.wysocki
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
