Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3811773ybi; Mon, 29 Jul 2019 13:06:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOyT2si65ncGqT3y15eEXKL+vW8RlYgLrcoDwT1UZpjw3s2I4W23dDoE/jlEtuIQGWX+aT X-Received: by 2002:a65:46cf:: with SMTP id n15mr11831688pgr.267.1564430770208; Mon, 29 Jul 2019 13:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430770; cv=none; d=google.com; s=arc-20160816; b=pqCAQ9whzklkIg85ZSyEj9V0rK04A9G9BfQ80kti127YNn5iK7O5SgCalVnfYZ52VI xmnzD9cD5jGwTNXSJg67h8X4hj+HQyf3is4FQsaQMRjatjrpFJU4+a9xJM+f7r+J0lSV ilaqvZt+Xnk52/FZ2skDsWB8Ra27s8TZqU4/yaiXf1bisuq7AoGlBAmLmbtRNbgMIgu6 yHzGHBXOMMrTZO9Y7bezEyzl9LpP/YmYXhtD4HGVhCaJjwyQopKkIorH4npv59RGkr0B g+O/t+BfNe8DhoCYZjZawlh8hKhBYfnnAcrXa8MIqwko3jac93WWyoxUE5UJfvgUWr6z UWjA== 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=RTUu+1ZiaUGx7mIp7qvyzEFpHQ/tO6Qi0RJFdu4vDMk=; b=Cvq8E3fTw0io15jlQSDtJ/SKyH01AIs+A/IFTx7RzSnToszYLCLVHYXHHo+ZIuFCl8 HxdQh1phOd+m3XCD2YSb3xE3j7TIkvFsHsrCC54+a5n29wV7+YrprECYDPgQ5XIK23vv W8gGhxRnFQVlNCvwIW9RqYzc53TWsDK8F+hBcSOWY+PjPz5wONoV9BgT2YG1N/fvFG/X Y9n9gcUwo5Q0jIrRDb48YfCx5PNSVt2W0NNGHUqK5kq5m4Kcbnoa4mQi/QHHp7QWYNx3 7NN8fkfPTeAB5R9pcMUu5XM0OObuZDjFkeeS7wixmt4F+oTgz1ngLqndGZDqAzhKQvVn MTcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="tZBdDU/r"; 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 v63si232317pgd.111.2019.07.29.13.05.54; Mon, 29 Jul 2019 13:06:10 -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="tZBdDU/r"; 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 S2389759AbfG2Tqh (ORCPT + 99 others); Mon, 29 Jul 2019 15:46:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:35908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390195AbfG2Tqf (ORCPT ); Mon, 29 Jul 2019 15:46:35 -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 CDB71205F4; Mon, 29 Jul 2019 19:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429594; bh=jKio98r7bD6DUVhaUeg7gcs55zmhKzD1WN9JN8IWG8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tZBdDU/rvx9tOLUTc5NH1ighH+BLPmBwnzaEJvxfX8leHIoXRmXDSiPhj99N3mer9 iWld7mFO8S7g5azbyTwWvph2NQKeJkCkZEeoovTInDpLLHj2ndTaRl8kZ+nlQ5aH8J Amjt5DBIPVC+JycHFyL7ferxOy5tK8cKYTWNqTfo= 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 5.2 006/215] iio: adc: stm32-dfsdm: manage the get_irq error case Date: Mon, 29 Jul 2019 21:20:02 +0200 Message-Id: <20190729190740.785576967@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@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 19adc2b23472..588907cc3b6b 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.20.1