Commit 2d8348b4 authored by Alexey Starikovskiy's avatar Alexey Starikovskiy Committed by Linus Torvalds
Browse files

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: default avatarAlexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: default avatarDaniel Ritz <daniel.ritz-ml@swissonline.ch>
Tested-by: default avatarLuca <kronos.it@gmail.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e70da563
...@@ -886,7 +886,8 @@ int __init acpi_ec_ecdt_probe(void) ...@@ -886,7 +886,8 @@ int __init acpi_ec_ecdt_probe(void)
printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n"); printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
boot_ec, NULL); boot_ec, NULL);
if (ACPI_FAILURE(status)) /* Check that acpi_get_devices actually find something */
if (ACPI_FAILURE(status) || !boot_ec->handle)
goto error; goto error;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment