Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp546842yba; Wed, 24 Apr 2019 05:53:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8VfpnTOuT1VxiiEibDyu7YjBuZoFJQVtb01TB32C4iFR/UWnVs02clVozZJK7fgShp6hj X-Received: by 2002:aa7:8581:: with SMTP id w1mr32566843pfn.249.1556110396483; Wed, 24 Apr 2019 05:53:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556110396; cv=none; d=google.com; s=arc-20160816; b=giLX77OzFCmMs0pmFa2TUqK5xoNG9pqu6rqpbkqBE3dn2xbSllU88p2ZFp+/wYAMjJ MDiLFq8g9XW6aLZdsXapad7+zvNtp0pHxzK7A/LZZmKrsQgYXCI8AWqMxBCg069xEOQq UXVQsqsOOLA50PikOHf5CPhG5mgT+10+EQw7p9fNnPPq8wYqEo0Jbtb8WtYaM4XIkj4o 2bKw3tVJ/wvJjj2T+0wC97yHtlmTyZh07BGa9qXzoCPYqLVUdw4TZjtpYfhv1G2ImP/6 6/VE4HG4Vb/garW8Rd8ZqqBzQCcfoiuunjP2R1+f7myBkCOQaBHZAX0zset7L2fUWOv5 QsHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=CM6jHsCN0ci/rkbPWkVsJZB5yRWaUgUmEYcs34yT/Pw=; b=S1RDNzmv+bqxPObWoYqOBzCvIBpm0hiPrCYC7xzSO2D53VUMnXkHLPOg2R/RaDtw4d CNegNltHUaUsJ9hvuMs+Odf18ALEBPFlUv08E2b+4GMMF+6RyGkBDPNAfIwARLgPcaU2 eVkdlJOH92ekuFY6DV0BvfoIxG+eF8ke0S5d67SCrkBcbyzjzD28e8Ju6CgdXBgP5Io1 kcT3gQfc9H6IUimN4KPcY5bcifZoxBKEcnOzFfmfirZYBv2Ocfjbwze3DXhYdSjg1CMc eDCxLo2VXfozC6pY7FLCwnaMu7TDhIiylcOliA7hIF5OHJI7r3aID4IVJ/Wk8zZhEwEi KtfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=1qcCVV4V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si18209178pla.316.2019.04.24.05.53.01; Wed, 24 Apr 2019 05:53:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=1qcCVV4V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730134AbfDXMv7 (ORCPT + 99 others); Wed, 24 Apr 2019 08:51:59 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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