Skip to content

Commit

Permalink
ACPI / scan: Fix check of device_attach() return value.
Browse files Browse the repository at this point in the history
Since device_attach() returns 1 on success (a driver has been bound
to the device), the check against its return value in
acpi_bus_device_attach() should modified to take that into accout.
Make it so.

[rjw: Subject and changelog.]
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Mika Westerberg authored and Rafael J. Wysocki committed Jan 11, 2013
1 parent f95988d commit abe9921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ static acpi_status acpi_bus_device_attach(acpi_handle handle, u32 lvl_not_used,
if (!acpi_match_device_ids(device, acpi_platform_device_ids)) {
/* This is a known good platform device. */
acpi_create_platform_device(device);
} else if (device_attach(&device->dev)) {
} else if (device_attach(&device->dev) < 0) {
status = AE_CTRL_DEPTH;
}
return status;
Expand Down

0 comments on commit abe9921

Please sign in to comment.