platform/x86: thinkpad_acpi: Fix a memory leak of EFCH MMIO resource
authorJean Delvare <jdelvare@suse.de>
Tue, 21 Jun 2022 13:55:11 +0000 (15:55 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 27 Jun 2022 07:38:56 +0000 (09:38 +0200)
commitd2f33f0c3ad7b0d5262d9b986f1353265fad7a08
tree65b08c40b7064074bc19671eb9df21600d818b9b
parent79e90ca02d7d45898c52fd8523cd4a2a304e409c
platform/x86: thinkpad_acpi: Fix a memory leak of EFCH MMIO resource

Unlike release_mem_region(), a call to release_resource() does not
free the resource, so it has to be freed explicitly to avoid a memory
leak.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 455cd867b85b ("platform/x86: thinkpad_acpi: Add a s2idle resume quirk for a number of laptops")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <markgross@kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20220621155511.5b266395@endymion.delvare
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/thinkpad_acpi.c