ACPI button: don't try to use a non-existent lid device

If a call comes in to check the lid state but there's no lid device
present, we should return -ENODEV.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by Jesse Barnes and committed by Len Brown 2c907b72 29062063

+3
+3
drivers/acpi/button.c
··· 251 251 acpi_status status; 252 252 unsigned long long state; 253 253 254 + if (!lid_device) 255 + return -ENODEV; 256 + 254 257 status = acpi_evaluate_integer(lid_device->handle, "_LID", NULL, 255 258 &state); 256 259 if (ACPI_FAILURE(status))