From patchwork Wed Apr 24 14:49:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien DESSENNE X-Patchwork-Id: 10914969 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 A35AB13B5 for ; Wed, 24 Apr 2019 14:49:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9019F1FF40 for ; Wed, 24 Apr 2019 14:49:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 830F828796; Wed, 24 Apr 2019 14:49:43 +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 00BA528736 for ; Wed, 24 Apr 2019 14:49:42 +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=OmE0QgpZOwiE0g5YD9oQulS0dbYOw7v2MFkjhhUixYQ=; b=GP2GYa0xzi3IL4 upKmMPRNBhJWpUNChLfA6srvndD6rUwMPdLGfnycAHAxT+TvpoqZuCbITnTyRacaf1xOoT9V2/gTN PG8pMkMoN4hi3pyObalfXC3I3FbS3yng2XKSOJcelpBWjZQQXnjSYCg7YS9QckShdEc9Tsu2YD7r3 vw2eNqkyRougjxRXPK53ZwxbH6ZUA0SkrG3gzOoYZZvl16lOoGREW541/Ig3df0tjFERGoztsWB/s P/GNCo3DjVIIr0YOpl3lXF49vZxfD40Ns+58uyDSTybdLk0x9f4pKfUozNgo7wA6n7qJjbUv1wJEg vDFDW4FDVGBjQajXZklg==; 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 1hJJDR-0007IL-K6; Wed, 24 Apr 2019 14:49:41 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJJDH-00078Z-De; Wed, 24 Apr 2019 14:49:33 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3OEfCTa007540; Wed, 24 Apr 2019 16:49:19 +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=6s1Tk9L2Xa2/OmOpTV1QTi7TgrOpLaf1ckgpFapd4kA=; b=m9G9AzhKVM2KfBQ9watK+EIq92OgLJJ7SDKuFg0xMHQh0bTqWrNSpgwvFJDX+PgpQaAx uQDPPVngvcLNNrj26jo7zB9a6oZhRwyIYwCasOhMMDuHaudt7Nl3sFnr/ZtU/AfQOLa/ Ck+ic7OyBKANdPu6iGvTwTqfLUWQ5p7/dEFkjZiz8Gl/iutpVNsx+WbU5WBZozxsrbFM k9zATtumRX/YbXLO7y5cSnqM7+gY39HqFp3Ko3IaHXNXZQi8EkQe7zsJeCONlnpSVBff IyIv5WEozyja0thDz/WsWlPXlcbHXQTykGG2wM1ImnbENntLsffuKLFP3P/q93Y7h/qn zQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2rytad77q8-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Apr 2019 16:49:19 +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 6535434; Wed, 24 Apr 2019 14:49:18 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 37FAD286C; Wed, 24 Apr 2019 14:49:18 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 24 Apr 2019 16:49:18 +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 16:49:17 +0200 From: Fabien Dessenne To: Boris Brezillon , Miquel Raynal , Richard Weinberger , "David Woodhouse" , Brian Norris , Marek Vasut , Maxime Coquelin , Alexandre Torgue , Christophe Kerello , , , , Subject: [PATCH] mtd: rawnand: stm32_fmc2: manage the get_irq error case Date: Wed, 24 Apr 2019 16:49:06 +0200 Message-ID: <1556117346-5608-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_074931_805387_C65C60AD X-CRM114-Status: GOOD ( 13.71 ) 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, check the "get_irq" error value. Signed-off-by: Fabien Dessenne Acked-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c index 999ca6a..4aabea2 100644 --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c @@ -1909,6 +1909,12 @@ static int stm32_fmc2_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_fmc2_irq, 0, dev_name(dev), fmc2); if (ret) {