Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762629AbXHaFGA (ORCPT ); Fri, 31 Aug 2007 01:06:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754650AbXHaFFx (ORCPT ); Fri, 31 Aug 2007 01:05:53 -0400 Received: from charybdis-ext.suse.de ([195.135.221.2]:52852 "EHLO emea5-mh.id5.novell.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751059AbXHaFFw (ORCPT ); Fri, 31 Aug 2007 01:05:52 -0400 Message-ID: <46D7A196.7070309@suse.de> Date: Fri, 31 Aug 2007 09:05:26 +0400 From: Alexey Starikovskiy User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: Linus Torvalds CC: Daniel Ritz , Luca Tettamanti , linux-kernel@vger.kernel.org, Len Brown , Andrew Morton Subject: [PATCH] ACPI: EC: Check if boot_ec was really found in DSDT References: <200708290129.57243.daniel.ritz-ml@swissonline.ch> <20070829232150.GA17467@dreamland.darkstar.lan> <200708301907.56561.daniel.ritz-ml@swissonline.ch> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1089 Lines: 31 From: Alexey Starikovskiy acpi_get_devices() returns success if it did not find any device. We have to check for this case. Signed-off-by: Alexey Starikovskiy --- drivers/acpi/ec.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 43749c8..3f7935a 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; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/