summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/button.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-15 15:10:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-15 15:10:27 -0700
commitbd72f85b9ad6cf41bc771de0cd27d892c41b4396 (patch)
tree3fd0909295dd427c4016dd8c09fae0050e007512 /drivers/acpi/button.c
parent13e356c977473baeb29e8abfd992f0cd938a78ce (diff)
parentd59733c1e56784a99381799021c4f9698f3e6379 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI button: don't try to use a non-existent lid device ACPI: video: Loosen strictness of video bus detection code eeepc-laptop: Prevent a panic when disabling RT2860 wireless when associated eeepc-laptop: Properly annote eeepc_enable_camera(). ACPI / PCI: Fix NULL pointer dereference in acpi_get_pci_dev() (rev. 2) fujitsu-laptop: address missed led-class ifdef fixup ACPI: Kconfig, fix proc aggregator text ACPI: add AC/DC notifier
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r--drivers/acpi/button.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 9335b87c517..0c9c6a9a002 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))