[PATCH v1 5/8] ACPI: bus: Rename label and use ACPI_FREE() in acpi_run_osc()

Rafael J. Wysocki
2025-12-18T20:43:20Z

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Use ACPI_FREE() for freeing an object coming from acpi_eval_osc()
and rename the "out_free" to "out" because it does not involve
kfree() any more.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/bus.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -293,7 +293,7 @@ acpi_status acpi_run_osc(acpi_handle han

if (acpi_osc_error_check(handle, &guid, context->rev, &context->cap, retbuf)) {
status = AE_ERROR;
- goto out_kfree;
+ goto out;
}

context->ret.length = out_obj->buffer.length;
@@ -301,12 +301,12 @@ acpi_status acpi_run_osc(acpi_handle han
context->ret.length, GFP_KERNEL);
if (!context->ret.pointer) {
status = AE_NO_MEMORY;
- goto out_kfree;
+ goto out;
}
status = AE_OK;

-out_kfree:
- kfree(output.pointer);
+out:
+ ACPI_FREE(out_obj);
return status;
}
EXPORT_SYMBOL(acpi_run_osc);