From patchwork Fri Aug 4 23:46:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Life is hard, and then you die" X-Patchwork-Id: 9882601 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A6DE4602B6 for ; Fri, 4 Aug 2017 23:56:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9951128A22 for ; Fri, 4 Aug 2017 23:56:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EA1F28A26; Fri, 4 Aug 2017 23:56:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 040BA28A24 for ; Fri, 4 Aug 2017 23:56:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754369AbdHDXzv (ORCPT ); Fri, 4 Aug 2017 19:55:51 -0400 Received: from chill.innovation.ch ([216.218.245.220]:51468 "EHLO chill.innovation.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754078AbdHDXzu (ORCPT ); Fri, 4 Aug 2017 19:55:50 -0400 X-Greylist: delayed 526 seconds by postgrey-1.27 at vger.kernel.org; Fri, 04 Aug 2017 19:55:50 EDT From: =?UTF-8?q?Ronald=20Tschal=C3=A4r?= To: "Rafael J. Wysocki" Cc: "Len Brown" , "Federico Lorenzi" , linux-acpi@vger.kernel.org, =?UTF-8?q?Ronald=20Tschal=C3=A4r?= Subject: [PATCH] ACPI / LPSS: Don't abort acpi scan on missing mem resource. Date: Fri, 4 Aug 2017 16:46:16 -0700 Message-Id: <1501890376-2662-1-git-send-email-ronald@innovation.ch> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On MacBook8's (2015) there appears to be no memory resource for the SPI master device. Returning an error here in this case then leads to the acpi device being ignored completely instead of just the handler being skipped. This isn't an issue on later MacBook(Pro)'s because their ACPI SPI devices don't have any CID and therefore no attempt is made to install this handler. Returning an error was introduced in commit d3e13ff3c1aa - this restores the original behaviour. Signed-off-by: Ronald Tschalär --- drivers/acpi/acpi_lpss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index e51a1e98e62f..558fbdec5b38 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -452,7 +452,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev, acpi_dev_free_resource_list(&resource_list); if (!pdata->mmio_base) { - ret = -ENOMEM; + /* Skip the device, but continue the namespace scan. */ + ret = 0; goto err_out; }