Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754945AbdCXSEn (ORCPT ); Fri, 24 Mar 2017 14:04:43 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35510 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754674AbdCXSDD (ORCPT ); Fri, 24 Mar 2017 14:03:03 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Hung , Aaron Lu , "Rafael J. Wysocki" , Sumit Semwal Subject: [PATCH 4.4 07/30] ACPI / video: skip evaluating _DOD when it does not exist Date: Fri, 24 Mar 2017 18:58:46 +0100 Message-Id: <20170324151221.282610301@linuxfoundation.org> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20170324151220.759111698@linuxfoundation.org> References: <20170324151220.759111698@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1066 Lines: 34 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alex Hung commit e34fbbac669de0b7fb7803929d0477f35f6e2833 upstream. 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 Cc: Sumit Semwal Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/acpi_video.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -1211,6 +1211,9 @@ static int acpi_video_device_enumerate(s 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"));