From patchwork Wed Apr 24 15:19:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien DESSENNE X-Patchwork-Id: 10915045 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 BE0EF14DB for ; Wed, 24 Apr 2019 15:19:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD2B2285B8 for ; Wed, 24 Apr 2019 15:19:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0EE628816; Wed, 24 Apr 2019 15:19:17 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 26740285B8 for ; Wed, 24 Apr 2019 15:19:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727393AbfDXPTQ (ORCPT ); Wed, 24 Apr 2019 11:19:16 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:41758 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbfDXPTQ (ORCPT ); Wed, 24 Apr 2019 11:19:16 -0400 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 x3OFG4bg017755; Wed, 24 Apr 2019 17:19:06 +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=KmHj9BJNTsMjihCbz69dy7mwpmwsOJzd/iH+JvmR26E=; b=eHQCBwjpnyB+zKEZzHlzscC6ukPdjAR3OEoorh10R5dSFdvoNT8Gk+6t6iul559F6eli gpBxmT60bezD+vBAqc6ZamQwvygil3zluOCwWnnvn6OJ8aCkv+cADI4sLUAzoPdFHQvN 4B3gqgUsyj91R2eLMuf14de+Bm0w5g7GOSCqVXzTqYMPkNwSukmEpaDl1SCIPa3v0fA7 i6GFzNuLgx8ixU6AlmNa5aQ1K0hI+Etqq/lwcL2ufsdYfk3yp8vGiFQaZWuyzksCulZN aRGr6D/2aT//8xSCAaKtWC6uFFvxBLjrYotomP2Duub/CMzFDSFooladjQRDyAEIwpcj dA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2ryrvxea79-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Apr 2019 17:19:06 +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 2941831; Wed, 24 Apr 2019 15:19:06 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0A3F128FC; Wed, 24 Apr 2019 15:19:06 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 24 Apr 2019 17:19:05 +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 17:19:05 +0200 From: Fabien Dessenne To: Mark Brown , Maxime Coquelin , Alexandre Torgue , Ludovic Barre , Christophe KERELLO , , , , CC: Fabien Dessenne Subject: [PATCH] spi: stm32-qspi: manage the get_irq error case Date: Wed, 24 Apr 2019 17:19:00 +0200 Message-ID: <1556119140-3319-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_09:,, signatures=0 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 During probe, check the "get_irq" error value. Signed-off-by: Fabien Dessenne Acked-by: Ludovic Barre --- drivers/spi/spi-stm32-qspi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c index 11a89aa..42f8e3c 100644 --- a/drivers/spi/spi-stm32-qspi.c +++ b/drivers/spi/spi-stm32-qspi.c @@ -574,6 +574,12 @@ static int stm32_qspi_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); + if (irq < 0) { + if (irq != -EPROBE_DEFER) + dev_err(dev, "IRQ error missing or invalid\n"); + return irq; + } + ret = devm_request_irq(dev, irq, stm32_qspi_irq, 0, dev_name(dev), qspi); if (ret) {