Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3813854ybi; Mon, 29 Jul 2019 13:08:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1GI8No8HEb9xa6V6F0eVcTH5VuqYs6NSHWzQmZUKprBFtkiTdNV3I70F40lmYo2qvwd4N X-Received: by 2002:a62:ae02:: with SMTP id q2mr37424331pff.1.1564430902350; Mon, 29 Jul 2019 13:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430902; cv=none; d=google.com; s=arc-20160816; b=hWVKaSTMSAQfX6reK9w3UU6KhxrqCImmE/nRdxsxjn+WqcDL6sxTIgAdLcPGXBu1dQ xre3WiOtiOzeROr6CjuxlkzdqOA3tCIKdJljVv9OkEVeOONZ6pB9GLAY2NCwlV/vAUKO MZ5C1CPeAbFjwLTnp/3Ifc5NDyaisQS6h6iN9TFLSIU6R33/oXaJzTPn8ygiXxTPNb3W QmqNcMDRyOuE/utrIpHGThBQuDz2gAvs61AaYPDZSO1+N6IuHuKo6MrD2mQkoZxZ8xdg 1W21YSt+4tLJJlftS2lVyb7fAesxyrpPspjQCjaxELi5R9HeHh2LDTs/5DnwnHEmqzJy jNRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IfH1B5faRi6XaF/0bQQfwCYaVe3kT/8pAM1HUqf1dkA=; b=pzarkRQEHdcZ83qRHYOS5u/DAyVcdDDLqBligNeul98kUgonAEq4iC7Q8VPzEEHjbD GypEmJRBPP1vmnej5Ywo7tMNbGNIFlCKGvdSE+iwuvjwuWvnY79fc0xz5RvAu/toQp81 +FLeMNSq5ibQbe8KL81vqxgUIiUiv9hgj6hlpCDlQbPrRqmnco6x+LUxTbaPbbNp0rsl XtEIZSQhATbzooT5TM8n7pVipOsGHcYm7PTwqKMfY54pjyz/i4h/9iCn9gNH5j+l06dR PbbAGJH+QnLWU5qlmyAXZIS4LEdd3rMSl5U6KCQ0NSRqfa5UFkGLsa4EqFG2OvLRuT/t oHEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=athokIhJ; 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 y8si27321732plp.96.2019.07.29.13.08.07; Mon, 29 Jul 2019 13:08:22 -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=@kernel.org header.s=default header.b=athokIhJ; 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 S2388796AbfG2Tk2 (ORCPT + 99 others); Mon, 29 Jul 2019 15:40:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:55718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388588AbfG2TkZ (ORCPT ); Mon, 29 Jul 2019 15:40:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4388D206DD; Mon, 29 Jul 2019 19:40:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429224; bh=C2RGfg0cJxGXzEoEg8FNKiIFxXbN0hdGRu6XWsmLnJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=athokIhJy3b7PRVxWYHWU3gHQnPUI9ebx+WqgmFwF3BmD3Ga0HMUFclqWYiPGhCrL a8BdkXtQy7l1A5/ojrbJCMdVaAW1uGx02I6l7vL0E4VIzvahN7KmFCeEFLhCZWpcwk q77Gglx6MZmKzbd7qERCObcL6IyHfdDUJ61ORQXU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fabien Dessenne , Fabrice Gasnier , Jonathan Cameron , Sasha Levin Subject: [PATCH 4.19 003/113] iio: adc: stm32-dfsdm: manage the get_irq error case Date: Mon, 29 Jul 2019 21:21:30 +0200 Message-Id: <20190729190656.450569740@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190655.455345569@linuxfoundation.org> References: <20190729190655.455345569@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 3e53ef91f826957dec013c47707ffc1bb42b42d7 ] During probe, check the "get_irq" error value. Signed-off-by: Fabien Dessenne Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- 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 fcd4a1c00ca0..15a115210108 100644 --- a/drivers/iio/adc/stm32-dfsdm-adc.c +++ b/drivers/iio/adc/stm32-dfsdm-adc.c @@ -1144,6 +1144,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.20.1