summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpi_video.c
diff options
context:
space:
mode:
authorAlex Hung <alex.hung@canonical.com>2016-05-27 10:47:06 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-06-22 03:00:04 +0300
commite34fbbac669de0b7fb7803929d0477f35f6e2833 (patch)
treec2829cf37683495abba357f28c936c7299922959 /drivers/acpi/acpi_video.c
parent007d94ca8b7df4d3230bfb68b88a627da887a671 (diff)
downloadlinux-e34fbbac669de0b7fb7803929d0477f35f6e2833.tar.xz
ACPI / video: skip evaluating _DOD when it does not exist
Some system supports hybrid graphics and its discrete VGA does not have any connectors and therefore has no _DOD method. Signed-off-by: Alex Hung <alex.hung@canonical.com> Reviewed-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_video.c')
-rw-r--r--drivers/acpi/acpi_video.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index c1d138e128cb..c5557d070954 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -1246,6 +1246,9 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
union acpi_object *dod = NULL;
union acpi_object *obj;
+ if (!video->cap._DOD)
+ return AE_NOT_EXIST;
+
status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer);
if (!ACPI_SUCCESS(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD"));