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: 10639233 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 017CA14BD 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 E96272C5A1 for ; Fri, 12 Oct 2018 19:48:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD9FD2C5A6; 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=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 772DB2C5A3 for ; Fri, 12 Oct 2018 19:48:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726158AbeJMDWb (ORCPT ); Fri, 12 Oct 2018 23:22:31 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:33977 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726722AbeJMDWa (ORCPT ); Fri, 12 Oct 2018 23:22:30 -0400 Received: by mail-lj1-f194.google.com with SMTP id j17-v6so12369769lja.1 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=mHSZ8UBUDg+rIWuzl2oPUJFneDWbyP4atL8Ij/1MDIFkV/RKO+L8qnb1Lj1WwVOJHl VMGFdDH2qviXMFt3vwPWVDpbhnII4zvTWkykBDwuZuHvuShIhtDOS37agRuPIwViNKan bGeTrFpjtmM+awA8xggbT9H/QbfKR9opQUsfKs3iHHb3PQUfEFtF6Y5kWOxS0DXlOnqB JpKefiwsYGVazqhu+T16QOGRK1+FdZWjVt92jdCqtYDCvwi7TxeQnnGmr8pURHnGvZz4 wQDBD0tVtn2a1KEz/JUTU+RkNM0DeEB0Ho/g5ToB/KserdeTDDbwyQc6iFqkY5Nh1rwl YEHg== X-Gm-Message-State: ABuFfoiLXFfgTTYFL/j1KJi7+pR0KqD/n95Trs+LHkHUSuJRe/+7j0rT m0ZkloxGwmrCDqLpqYrDQs0gV0hROhA= 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-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@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; }