Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3095969ybi; Thu, 18 Jul 2019 20:57:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDcR60STV+B0SkObvUzKT/YUqkBYjEkat9FwsLnLDltKAr6odU1u/85DpfH6qhT0e2DyZo X-Received: by 2002:a63:b20f:: with SMTP id x15mr53187376pge.453.1563508646436; Thu, 18 Jul 2019 20:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563508646; cv=none; d=google.com; s=arc-20160816; b=QY7bKgPqz7K7Vf7VsquOQszOoAeVmazsC3ACDwt9WE6DrfobQqJOiiEeN46LFVC305 tlc2puFVecTJaNN6pmD5quYgdO9MeG2fNZVD/u9C3zyLfez+I96yR9cFhaa7tZvjMTW4 7tVMuG677ixtTQToIXTLjxyZRtAkubLRhpAMmDD/6P4ztiSYGFk1laGBAyAwHTydP8gi 1hQ2fliCY5a09eK7uvStDowblQlDxjuebbi2Zj1hMgPzy23JhhoqfQc8fgVadfOZkx3m g/ovkHU0I6IQOXOVDvdDWmCzEdA0c/JkhGU+CqR02VIx+e22irk/O/hGoB/jD1wA+D0A 6cHw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=63GIUqqYQmh592jBBbW4vSdRvdmvfJ81ebFHC9b214c=; b=zqZ61hkqNCulCKQ25hVlLyrS1P6l5fNVwZu/RAdClJrvTMTJ2ZlyeVFyLXPo0OUp96 2T1RlvrF2io5MJ9XApsI2aBpA+JglSN3MlFAJlQosMSUX1IWBBtllctXvjirmqDGY99v SBaEm+FfUmRXwiSbNxW9s7dKhWlxW8UGxRtWB+7HEY71uwZh0j1JgIxz3jiyMVq8Pg9e EZWP1rXc/PcwBZDrb6+Jd5N1JvEqEXs5cNvJOpgtHVNfJFBinSghtZIqvp1qPue8yRXd ufiQ4sOee5u2mNEHWuuuWi+MKbfszc1HdHr5AQdjawDKGF3m+Zw4q+Otq0V0ifZVYMSm 7zGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BhOCqz2K; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n123si3441331pgn.151.2019.07.18.20.57.11; Thu, 18 Jul 2019 20:57:26 -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=BhOCqz2K; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726802AbfGSD4u (ORCPT + 99 others); Thu, 18 Jul 2019 23:56:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:56166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbfGSD4t (ORCPT ); Thu, 18 Jul 2019 23:56:49 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1845A21850; Fri, 19 Jul 2019 03:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508608; bh=8XDsGFM4Eq54gtQvck4W4e5XB0iP9xgO8YE6Tl1Io08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BhOCqz2KOyKevIE0Z/XDMWf7UGUhzl6lK8pMfU5HPnxqPXXYLQJTi/b2stA4YiCV4 Rq0ZM0ZfK+iTlcLob60nNWJ8zBaY71AohJASa/EBdiZC+Grxiegiq0FnycD9ZqviO5 Qo7R2Hj7uLDtBPKAXJ/neShIkcA+vPhLPTU3kdbA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Fabien Dessenne , Fabrice Gasnier , Jonathan Cameron , Sasha Levin , linux-iio@vger.kernel.org Subject: [PATCH AUTOSEL 5.2 003/171] iio: adc: stm32-dfsdm: manage the get_irq error case Date: Thu, 18 Jul 2019 23:53:54 -0400 Message-Id: <20190719035643.14300-3-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fabien Dessenne [ 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