diff options
| author | Mika Westerberg <[email protected]> | 2013-01-11 22:08:09 +0100 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2013-01-11 22:08:09 +0100 |
| commit | abe99210e0f624cea39f1dc375ba818b201c0d7f (patch) | |
| tree | 55b88ba9c086d04fb7534ed10147f012cc1076f6 /drivers/acpi/scan.c | |
| parent | f95988de06ea62ef5bd861f06e9ef56cea405ed1 (diff) | |
ACPI / scan: Fix check of device_attach() return value.
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 <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/acpi/scan.c')
| -rw-r--r-- | drivers/acpi/scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index e380345b643a..bac357da3f29 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -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; |