• Rafael J. Wysocki's avatar
    ACPI / scan: More straightforward preparation of ACPI device objects · d43e167d
    Rafael J. Wysocki authored
    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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    d43e167d
scan.c 43.4 KB