Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d2f33f0

Browse files
jdelvarejwrdegoede
authored andcommitted
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 <[email protected]> Fixes: 455cd86 ("platform/x86: thinkpad_acpi: Add a s2idle resume quirk for a number of laptops") Cc: Mario Limonciello <[email protected]> Cc: Henrique de Moraes Holschuh <[email protected]> Cc: Hans de Goede <[email protected]> Cc: Mark Gross <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent 79e90ca commit d2f33f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4529,6 +4529,7 @@ static void thinkpad_acpi_amd_s2idle_restore(void)
45294529
iounmap(addr);
45304530
cleanup_resource:
45314531
release_resource(res);
4532+
kfree(res);
45324533
}
45334534

45344535
static struct acpi_s2idle_dev_ops thinkpad_acpi_s2idle_dev_ops = {

0 commit comments

Comments
 (0)