From patchwork Wed Oct 7 21:39:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 52352 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n97Le3w3009184 for ; Wed, 7 Oct 2009 21:40:03 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E7EE9E8AE; Wed, 7 Oct 2009 14:40:02 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from outbound-mail-152.bluehost.com (outbound-mail-152.bluehost.com [67.222.39.32]) by gabe.freedesktop.org (Postfix) with SMTP id 8EAF49E80B for ; Wed, 7 Oct 2009 14:39:59 -0700 (PDT) Received: (qmail 27018 invoked by uid 0); 7 Oct 2009 21:39:58 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by outboundproxy5.bluehost.com with SMTP; 7 Oct 2009 21:39:58 -0000 Received: from [75.111.28.251] (helo=jbarnes-g45) by box514.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1MveEo-0000PE-ED; Wed, 07 Oct 2009 15:39:58 -0600 Date: Wed, 7 Oct 2009 14:39:46 -0700 From: Jesse Barnes To: Len Brown , intel-gfx@lists.freedesktop.org, linux-acpi@vger.kernel.org Message-ID: <20091007143946.3fad3fa8@jbarnes-g45> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.17.5; i486-pc-linux-gnu) Mime-Version: 1.0 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 75.111.28.251 authed with jbarnes@virtuousgeek.org} Subject: [Intel-gfx] [PATCH] ACPI button: don't try to use a non-existent lid device X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 9335b87..0c9c6a9 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -251,6 +251,9 @@ int acpi_lid_open(void) acpi_status status; unsigned long long state; + if (!lid_device) + return -ENODEV; + status = acpi_evaluate_integer(lid_device->handle, "_LID", NULL, &state); if (ACPI_FAILURE(status))