Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754385AbdDJPe0 (ORCPT ); Mon, 10 Apr 2017 11:34:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:37988 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754262AbdDJPeO (ORCPT ); Mon, 10 Apr 2017 11:34:14 -0400 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alex Hung , "Rafael J . Wysocki" , Sumit Semwal , Jiri Slaby Subject: [PATCH 3.12 046/142] ACPI / video: skip evaluating _DOD when it does not exist Date: Mon, 10 Apr 2017 17:32:07 +0200 Message-Id: <4bdc5ba8a48cd171368def87ec1e701bdd8c5a9c.1491838390.git.jslaby@suse.cz> X-Mailer: git-send-email 2.12.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1160 Lines: 36 From: Alex Hung 3.12-stable review patch. If anyone has any objections, please let me know. =============== 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: Jiri Slaby --- drivers/acpi/video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index ff5ec8ecc257..cf7efcda09e1 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -1174,6 +1174,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")); -- 2.12.2