From: Alex Hung Date: Fri, 27 May 2016 07:47:06 +0000 (+0800) Subject: ACPI / video: skip evaluating _DOD when it does not exist X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e34fbbac669de0b7fb7803929d0477f35f6e2833;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Aaron Lu Signed-off-by: Rafael J. Wysocki --- 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"));