Commit 5ada8051 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarJonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/8682086.NyiUUSuA9g@rafael.j.wysocki
parent d179ae1f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -308,19 +308,19 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)

	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;
	context->ret.pointer = kmemdup(retbuf, 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);