ACPI / video: skip evaluating _DOD when it does not exist
authorAlex Hung <alex.hung@canonical.com>
Fri, 27 May 2016 07:47:06 +0000 (15:47 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 22 Jun 2016 00:00:04 +0000 (02:00 +0200)
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>
drivers/acpi/acpi_video.c

index c1d138e128cba4aeddbc54a807a6f235142c982c..c5557d070954c6a7bbf8799b0f2cc4ee593a14d4 100644 (file)
@@ -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"));