ACPI / scan: More straightforward preparation of ACPI device objects
Simplify the code preparing struct acpi_device objects for
registration by removing useless code, moving different pieces of
code into the functions they belong to and making a couple of int
functions always returning 0 void.
This also fixes a possible memory leak in ACPI device registration
error code path by making acpi_device_register() detach data from
device->handle if device_register() fails and prepares the scanning
code for special-casing ACPI power resources (next patch).
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing
想要评论请 注册 或 登录