Skip to content

Commit 5ada805

Browse files
committed
ACPI: bus: Rename label and use ACPI_FREE() in acpi_run_osc()
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> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Link: https://patch.msgid.link/8682086.NyiUUSuA9g@rafael.j.wysocki
1 parent d179ae1 commit 5ada805

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/acpi/bus.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,19 +308,19 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
308308

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

314314
context->ret.length = out_obj->buffer.length;
315315
context->ret.pointer = kmemdup(retbuf, context->ret.length, GFP_KERNEL);
316316
if (!context->ret.pointer) {
317317
status = AE_NO_MEMORY;
318-
goto out_kfree;
318+
goto out;
319319
}
320320
status = AE_OK;
321321

322-
out_kfree:
323-
kfree(output.pointer);
322+
out:
323+
ACPI_FREE(out_obj);
324324
return status;
325325
}
326326
EXPORT_SYMBOL(acpi_run_osc);

0 commit comments

Comments
 (0)