[PATCH] ACPI / device_sysfs: Use ACPI_FREE for ACPI object deallocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace kfree() with ACPI_FREE() for deallocating ACPI objects in the
description_show() function.

The str_obj variable contains an ACPI object that was allocated through
ACPI subsystem functions. Such objects should be freed using ACPI_FREE()
rather than the generic kfree() to ensure proper cleanup and maintain
consistency with ACPI memory management conventions.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@xxxxxxxxx>
---
 drivers/acpi/device_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index 3961fc47152c..cd199fbe4dc9 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -464,7 +464,7 @@ static ssize_t description_show(struct device *dev,
 
 	buf[result++] = '\n';
 
-	kfree(str_obj);
+	ACPI_FREE(str_obj);
 
 	return result;
 }
-- 
2.34.1





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux