From patchwork Wed Apr 24 12:38:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien DESSENNE X-Patchwork-Id: 10914681 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 826CA13B5 for ; Wed, 24 Apr 2019 12:39:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F27828A34 for ; Wed, 24 Apr 2019 12:39:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6322728AA4; Wed, 24 Apr 2019 12:39:10 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F0F928A34 for ; Wed, 24 Apr 2019 12:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qk+HVNV/zVo6tBkCCYIc5hb08QjXBSusphXaQJIHnuQ=; b=Cgn14+HFReqg3V hbKWZg0d+CPW/t7qJROBfLYGbCR5hEY8giwcRWjdgj9lLOt56B8uDsg2aefxh1RlOE0vbAMuZM6oZ NWhzvynIEyqmxuqogMxHGO0nW20MVMsvjdPe4fZ0vUPGrdcYZ11Zr09UESqFm2pdvUw5edumOVHXj FtuYXJ1EMKnHYPPGAsYybipy0M9UbBDe6kY9baPKztLt0v9L/wpkOwp2flMhfwucw66o+i3qPHohs TTlvcZQQbd0VhD5hx0ZWkQwr0I4v1l0ip7EQlTfeYpG2LEh/IVnSFmoMQGbtL0hppSv7sEcD1I1CU E4+mah/Lx5KANOuE//lA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJHB3-0003AM-DW; Wed, 24 Apr 2019 12:39:05 +0000 Received: from mx07-00178001.pphosted.com ([62.209.51.94]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJHB0-00039y-Qs for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 12:39:04 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3OCaqCa030305; Wed, 24 Apr 2019 14:38:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=lmJwsmbg2fa79RUKnKTfYreM1E8A9rVsKKAtwPIzarQ=; b=0JFHPycFxZn8e5V7DZ3v4KZtihHO6tAhPZUU5XVrK6v996KlG4GHnaUn98mbaG5kucaf cqYldf02FdGx3oToweAU+WgrOuf4sdjh8eg4V+IOC5V+mhIYZYToEe4ErNY/AhbyvqDM qBUXEjAz/BycXX4AqTCs8W1xhinsUH/gi9jr9cLq9pSS2Mt/HKl5KDgitKb1O/NBhHXP WWc6wGy4H/bLu8yAinK4RWAYbR5Cpxf2N7ZMxdySjvMM8mtMdfw+pW2Vjeo1Dnq9MGWJ l8AqvE9HValCmurydZX0PuajHWHGP0p39t5uQQvCCvHUVdH5EwOo9vPl4eGiYoBCZz1k jQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2ryrvxdgga-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Apr 2019 14:38:56 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4747D31; Wed, 24 Apr 2019 12:38:56 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 27F13258B; Wed, 24 Apr 2019 12:38:56 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Apr 2019 14:38:55 +0200 Received: from localhost (10.201.23.25) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Apr 2019 14:38:55 +0200 From: Fabien Dessenne To: Mark Brown , Maxime Coquelin , Alexandre Torgue , Amelie Delaunay , , , , Subject: [PATCH] spi: stm32: return the get_irq error Date: Wed, 24 Apr 2019 14:38:44 +0200 Message-ID: <1556109524-21874-1-git-send-email-fabien.dessenne@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.201.23.25] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-24_08:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_053903_174884_5A36EF91 X-CRM114-Status: GOOD ( 13.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabien Dessenne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP During probe, return the "get_irq" error value instead of -ENOENT. This allows the driver to be defer probed if needed. Signed-off-by: Fabien Dessenne Acked-by: Amelie Delaunay --- drivers/spi/spi-stm32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 4186ed2..b222ce8 100644 --- a/drivers/spi/spi-stm32.c +++ b/drivers/spi/spi-stm32.c @@ -1839,8 +1839,9 @@ static int stm32_spi_probe(struct platform_device *pdev) spi->irq = platform_get_irq(pdev, 0); if (spi->irq <= 0) { - dev_err(&pdev->dev, "no irq: %d\n", spi->irq); - ret = -ENOENT; + ret = spi->irq; + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, "failed to get irq: %d\n", ret); goto err_master_put; } ret = devm_request_threaded_irq(&pdev->dev, spi->irq,