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: 10639235 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 D8C8314BD for ; Fri, 12 Oct 2018 19:48:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC5B92C59E for ; Fri, 12 Oct 2018 19:48:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0A622C5A3; Fri, 12 Oct 2018 19:48:28 +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=unavailable 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 34FD82C59E for ; Fri, 12 Oct 2018 19:48:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726663AbeJMDWa (ORCPT ); Fri, 12 Oct 2018 23:22:30 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45302 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbeJMDWa (ORCPT ); Fri, 12 Oct 2018 23:22:30 -0400 Received: by mail-lj1-f194.google.com with SMTP id j4-v6so12331582ljc.12 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=jJmE8K5SB92NSnqfQDGILSpHIccNsBd7BGrqu/B7yTr7sfj5DEViQUs9KFNDBvGUZ6 uJ6Pcpevf4MOuqETCngJWzJ0Be1CXX4myVctbwpSHb9UpdcjQDAAL5Exfl+g997A1HyN MciGLXXnFtzgWt+1w95p/CKPaWMI7USUKFjKpPIW3EiK1gPRPOn5TMHMxvhuUluZt1Tr 05E7be2Y5JyO7LPk9wAvxO/d5F55rr1ANaVDYNjOPUDq5nhrt1fZzC2yzo1XZh/AZNkT zKKu/vTJ/Hedyn1HSVyEyRo2lXjDpXjuE+oprc6oImLYEcjjMedLixf22W32daOooHBX lNnA== X-Gm-Message-State: ABuFfoglysiWH58swKQK0Th/Ix/hDszWOxtlrZ96MrhzsP+StRHyqI1q eXmlHbGDXZ8sU3ZMC/pn7QsyAw== 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-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@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; }