[RFC PATCH v8 06/10] ACPICA: Add __free() based cleanup function for acpi_put_table
From: shiju.jose
Date: Fri Apr 19 2024 - 12:48:52 EST
From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
Add __free() based cleanup function for acpi_put_table.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
Signed-off-by: Shiju Jose <shiju.jose@xxxxxxxxxx>
---
include/acpi/acpixf.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 3d90716f9522..fc64d903a703 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -492,6 +492,8 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
**out_table))
ACPI_EXTERNAL_RETURN_VOID(void acpi_put_table(struct acpi_table_header *table))
+DEFINE_FREE(acpi_put_table, struct acpi_table_header *, if (!IS_ERR_OR_NULL(_T)) acpi_put_table(_T))
+
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_get_table_by_index(u32 table_index,
struct acpi_table_header
--
2.34.1