From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FD29C282CE for ; Wed, 24 Apr 2019 12:51:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 406E6218B0 for ; Wed, 24 Apr 2019 12:51:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="1qcCVV4V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729586AbfDXMv6 (ORCPT ); Wed, 24 Apr 2019 08:51:58 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:4366 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728701AbfDXMv6 (ORCPT ); Wed, 24 Apr 2019 08:51:58 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3OCh4rM001675; Wed, 24 Apr 2019 14:51:37 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=CM6jHsCN0ci/rkbPWkVsJZB5yRWaUgUmEYcs34yT/Pw=; b=1qcCVV4VNsD+NhT+QnNPEwGsb60OrCXWGz2OUP4qH6/M70SnjqjbbJOYm9LnzBvbzYpw iiOVTGuqRkELaYG+v1mPWExxuifZNTCkWcG/htcdXjSV1jVaUZ1nG9Drm5WIHfoZHGb0 GNn9N5NiG6lrRfCXdSzid8wkKwCJ7WCIO+SywwWK/7yiEfs1c9pSIMGf6cR6wSTjzMBv 26z/V/tLhgI4BuVN7Xw7iNVl7EsZ8Loq6er+nOTYbwbgU0UyWI0q0EeGepqjDIYzuEb3 JC+i/y7qfrspXGEsugfoIefcEcor+WiL4bCvvqzlUuy764zNp43ECSncQ0frHtGie/7d zg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2ryrj670dv-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Apr 2019 14:51:37 +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 7AB8E3A; Wed, 24 Apr 2019 12:51:36 +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 387DA25CA; Wed, 24 Apr 2019 12:51:36 +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 14:51:36 +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:51:35 +0200 From: Fabien Dessenne To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Maxime Coquelin , "Alexandre Torgue" , Fabrice Gasnier , , , , CC: Fabien Dessenne Subject: [PATCH 1/2] iio: adc: stm32-dfsdm: manage the get_irq error case Date: Wed, 24 Apr 2019 14:51:25 +0200 Message-ID: <1556110286-1526-2-git-send-email-fabien.dessenne@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556110286-1526-1-git-send-email-fabien.dessenne@st.com> References: <1556110286-1526-1-git-send-email-fabien.dessenne@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.25] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-24_08:,, signatures=0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org During probe, check the "get_irq" error value. Signed-off-by: Fabien Dessenne --- drivers/iio/adc/stm32-dfsdm-adc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c index 19adc2b..588907c 100644 --- a/drivers/iio/adc/stm32-dfsdm-adc.c +++ b/drivers/iio/adc/stm32-dfsdm-adc.c @@ -1456,6 +1456,12 @@ static int stm32_dfsdm_adc_probe(struct platform_device *pdev) * So IRQ associated to filter instance 0 is dedicated to the Filter 0. */ irq = platform_get_irq(pdev, 0); + if (irq < 0) { + if (irq != -EPROBE_DEFER) + dev_err(dev, "Failed to get IRQ: %d\n", irq); + return irq; + } + ret = devm_request_irq(dev, irq, stm32_dfsdm_irq, 0, pdev->name, adc); if (ret < 0) { -- 2.7.4