ACPI / DPTF: Use ACPI_FREE() for ACPI buffer deallocation
PATCH 1/1 ACPI / DPTF: Use ACPI_FREE() for ACPI buffer deallocation
Replace kfree() with ACPI_FREE() in pch_fivr_read() for deallocating ACPI buffer objects. The buffer.pointer contains an ACPI object allocated through ACPI subsystem functions and should be freed using ACPI_FREE() to ensure proper cleanup and maintain consistency with ACPI memory management conventions.
--- drivers/acpi/dptf/dptf_pch_fivr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/dptf/dptf_pch_fivr.c +1 -1
@@ -41,7 +41,7 @@ static int pch_fivr_read(acpi_handle handle, char *method, struct pch_fivr_resp ret =0 ; release_buffer: -kfree (buffer.pointer); +ACPI_FREE (buffer.pointer);return ret; }
Signature · 1 line
2.34.1
Rafael J. Wysocki
maintainerQuoted 6 lines · Kaushlendra Kumar
Replace
kfree()withACPI_FREE()inpch_fivr_read()for deallocating ACPI buffer objects. The buffer.pointer contains an ACPI object allocated through ACPI subsystem functions and should be freed usingACPI_FREE()to ensure proper cleanup and maintain consistency with ACPI memory management conventions.
This is just a conventional thing because ACPI_FREE() in Linux is implemented as kfree().
There is no correctness issue here, just the convention is not followed, so please update the changelog.
Quoted 21 lines
Signed-off-by Kaushlendra Kumar <[email protected]>--- drivers/acpi/dptf/dptf_pch_fivr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/acpi/dptf/dptf_pch_fivr.c +1
-2@@ -41,7 +41,7 @@ static int pch_fivr_read(acpi_handle handle, char *method, struct pch_fivr_resp ret =0 ; release_buffer: -kfree (buffer.pointer); +ACPI_FREE (buffer.pointer);return ret; } --2.34.1
Quoted 3 lines
This is just a conventional thing because
ACPI_FREE()in Linux is implemented askfree().There is no correctness issue here, just the convention is not followed, so please update the changelog.
You're right. I have update the changelog in V2 patch to clarify this is about following ACPI coding conventions rather than fixing a functional issue.
Thanks for the feedback!
Kaushlendra