Commit c759bc8e authored by Joe Hattori's avatar Joe Hattori Committed by Rafael J. Wysocki
Browse files

ACPI: fan: cleanup resources in the error path of .probe()



Call thermal_cooling_device_unregister() and sysfs_remove_link() in the
error path of acpi_fan_probe() to fix possible memory leak.

This bug was found by an experimental static analysis tool that I am
developing.

Fixes: 05a83d97 ("ACPI: register ACPI Fan as generic thermal cooling device")
Signed-off-by: default avatarJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Link: https://patch.msgid.link/20241211032812.210164-1-joe@pf.is.s.u-tokyo.ac.jp


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 78d4f34e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment