From patchwork Fri Oct 12 19:48:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10639231 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C648E13AD for ; Fri, 12 Oct 2018 19:48:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7A662C5A1 for ; Fri, 12 Oct 2018 19:48:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABCE52C5AA; Fri, 12 Oct 2018 19:48:27 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 565052C5A1 for ; Fri, 12 Oct 2018 19:48:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726054AbeJMDWa (ORCPT ); Fri, 12 Oct 2018 23:22:30 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37859 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbeJMDWa (ORCPT ); Fri, 12 Oct 2018 23:22:30 -0400 Received: by mail-lj1-f196.google.com with SMTP id 63-v6so12359786ljs.4 for ; Fri, 12 Oct 2018 12:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:organization:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=wIOpQ/dA6XIe/DxqmF4Q/c9c0uxrL+qfC5KkUTatM08=; b=WeMOlRUnWdP+c8ghgI6DcgAF6PXYBOpKYu69eoNXFfKUMwKWlEYjEo3lZq42hAkuIW B/TNA8uQmxOddtAUDqmp7ZClsIcRRbx28+A8yrtgg9xG4uIP/7hBU4JgXSieLKDy2ZZ8 tCnWT9pxVxfPVMhHctzKaNb/aIwSfrXHjjTB9dAyRa70Xm90UsK298dBBj9C9JsdZaSe bQVD21gRmZcoPboUsOV6104nJIbQzFGiuaX/GmExKZs/Op2cLecZ54gSYFyjfMPFIIL4 GOczDtIBudHxZOwDwWRYLPwa/7uiUCeHm/THX1Jrg7LE5arE5BLFCYUt8EQlU/sEv8ma UKsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:organization:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=wIOpQ/dA6XIe/DxqmF4Q/c9c0uxrL+qfC5KkUTatM08=; b=tgrbcJVoLoPgCIHM8E1NdMp4FihsIcXTI0Az/phkr+WD7EyLG3yX9PnIiPYteGI9Ik jVUPZJ1Mu64pCZAU6CttTM4GYhuk/ojrerULNWqwH1wH40zcvPO0C+Q5p9geAtWcI8ut CZxr2r5tSUPzqGsZYvEiPNvvy5/DlbwFeXYYkqusqB6c10HHxT7Xh0WzUqnnPQEKUbKj tOWvFizPnEH5b8+84HxqpKg+op+ewNXsXduDxYYjARMoEmqBmJDM6rU2ayOfcUQeTaZu qrN5j1hGgVzHTKER2IH6SLXpaw13w8RVcC9zoxkpWbG54FBLt5xfSt4y89lSIF/2dw8v NH1w== X-Gm-Message-State: ABuFfoisG9W0W0vJlMe0pp6xeQE7Y7eylqGkjAzElCKlKibikxXN6Xv3 ugdGOp7HOwU3CWa2Euj7P3hGRa+t154= X-Google-Smtp-Source: ACcGV62qKtfty0ed5psKbtaqpB9zDGF3jbyD0hT8pigunrMb1I6na5cNeae+W0X35+bsWb3bO+cOXQ== X-Received: by 2002:a2e:9549:: with SMTP id t9-v6mr4967847ljh.94.1539373704614; Fri, 12 Oct 2018 12:48:24 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.84.217]) by smtp.gmail.com with ESMTPSA id k9-v6sm456008lje.51.2018.10.12.12.48.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 12:48:23 -0700 (PDT) From: Sergei Shtylyov Subject: [PATCH] spi: sh-msiof: fix deferred probing To: Mark Brown , linux-spi@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, linux-sh@vger.kernel.org Organization: Cogent Embedded Message-ID: Date: Fri, 12 Oct 2018 22:48:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Language: en-MW Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") platform_get_irq() can return -EPROBE_DEFER. However, the driver overrides an error returned by that function with -ENOENT which breaks the deferred probing. Propagate upstream an error code returned by platform_get_irq() and remove the bogus "platform" from the error message, while at it... Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergei Shtylyov --- The patch is against the 'for-linus' branch of Mark Brown's 'spi.git' repo. drivers/spi/spi-sh-msiof.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: spi/drivers/spi/spi-sh-msiof.c =================================================================== --- spi.orig/drivers/spi/spi-sh-msiof.c +++ spi/drivers/spi/spi-sh-msiof.c @@ -1343,8 +1343,8 @@ static int sh_msiof_spi_probe(struct pla i = platform_get_irq(pdev, 0); if (i < 0) { - dev_err(&pdev->dev, "cannot get platform IRQ\n"); - ret = -ENOENT; + dev_err(&pdev->dev, "cannot get IRQ\n"); + ret = i; goto err1; }