From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 684C36FBD for ; Wed, 20 Sep 2023 12:33:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E186FC433C7; Wed, 20 Sep 2023 12:33:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695213211; bh=cK0mBvJoxtKDSRQylpNuod2RMnqinbhkb61/jN92DFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sMHyVRv6nR+JaJzj037ZSKjAKqA+LCLpuwZm5JdhHvuy7xMRd+Gg+l/GsQXTSAXR8 2HW0v0SkeUFPvZILEwpnWtQogu1bE2S14EH6IWSxbCS2YMqvizlDbRXGKku8q+xmrS f6FMkzPiSoMSyPZSKyMupak9JFb3bAxDJoJM6vqs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ruan Jinjie , Linus Walleij , Vinod Koul , Sasha Levin Subject: [PATCH 5.4 201/367] dmaengine: ste_dma40: Add missing IRQ check in d40_probe Date: Wed, 20 Sep 2023 13:29:38 +0200 Message-ID: <20230920112903.828512887@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230920112858.471730572@linuxfoundation.org> References: <20230920112858.471730572@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: ruanjinjie [ Upstream commit c05ce6907b3d6e148b70f0bb5eafd61dcef1ddc1 ] Check for the return value of platform_get_irq(): if no interrupt is specified, it wouldn't make sense to call request_irq(). Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3") Signed-off-by: Ruan Jinjie Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230724144108.2582917-1-ruanjinjie@huawei.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/ste_dma40.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 6671bfe084895..96a808b487cbe 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3599,6 +3599,10 @@ static int __init d40_probe(struct platform_device *pdev) spin_lock_init(&base->lcla_pool.lock); base->irq = platform_get_irq(pdev, 0); + if (base->irq < 0) { + ret = base->irq; + goto destroy_cache; + } ret = request_irq(base->irq, d40_handle_interrupt, 0, D40_NAME, base); if (ret) { -- 2.40.1