From: Alexey Starikovskiy Date: Fri, 31 Aug 2007 05:05:26 +0000 (+0400) Subject: ACPI: EC: Check if boot_ec was really found in DSDT X-Git-Tag: v2.6.23-rc5~38 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d8348b429b4ae5cc47449c787881221fe43af4b;p=linux-2.6 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 Tested-by: Daniel Ritz Tested-by: Luca Signed-off-by: Linus Torvalds --- diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 43749c8686..3f7935ab0c 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -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; }