summary refs log tree commit diff
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorVicki Pfau <vi@endrift.com>2023-02-21 19:38:03 -0800
committerCristian Ciocaltea <cristian.ciocaltea@collabora.com>2023-09-11 23:46:39 +0300
commit79c8690d0153a6ef2eea461a92c903efd22b6786 (patch)
tree452b968f9aa1f17d000eea921e04c2a24267709a /drivers/acpi/scan.c
parent87e2a7e2c8b2f120b56ec46a263d7cd6ca6a252e (diff)
downloadlinux-79c8690d0153a6ef2eea461a92c903efd22b6786.tar.gz
ACPI: utils: Make acpi_handle_list dynamically allocated
This fixes a long-standing "TBD" comment in the ACPI headers regarding making
the acpi_handle_list struct's size dynamic. The number 10, which along with the
comment dates back to 2.4.23, seems like it may have been arbitrarily chosen,
and isn't sufficient in all cases. This patch finally makes the size dynamic
and updates its users to handle the modified API.

Signed-off-by: Vicki Pfau <vi@endrift.com>
(cherry picked from commit e4efc98ccb538204b344c64a419a601e3f50e79e)
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index b47e93a24a9a..d35e9c104c1f 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -2023,6 +2023,7 @@ static u32 acpi_scan_check_dep(acpi_handle handle, bool check_dep)
 		mutex_unlock(&acpi_dep_list_lock);
 	}
 
+	kfree(dep_devices.handles);
 	return count;
 }