ACPI: EC: Check if boot_ec was really found in DSDT

acpi_get_devices() returns success if it did not find any device.
We have to check for this case.

Signed-off-by: Alexey Starikovskiy <[email protected]>
Tested-by: Daniel Ritz <[email protected]>
Tested-by: Luca <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Alexey Starikovskiy 2007-08-31 09:05:26 +04:00 • committed by Linus Torvalds
commit 2d8348b429

View file

@ -886,7 +886,8 @@ int __init acpi_ec_ecdt_probe(void)
printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
boot_ec, NULL);
if (ACPI_FAILURE(status))
/* Check that acpi_get_devices actually find something */
if (ACPI_FAILURE(status) || !boot_ec->handle)
goto error;
}