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 B793830F8E for ; Wed, 20 Sep 2023 12:17:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B955C43215; Wed, 20 Sep 2023 12:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695212247; bh=+9l1Cwo+QarYoiAuvS9ScwicLsttcyzOIRxxk8K7onU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TZAHCw5ubi9/kSCqX+QEPSI/CYnK6fF+IZO8FjeLeHByG0383WF0jTK23MQkCOBBK PAJQEsvpQE8vxNtrP3YYKu+l5kv5BXOJjWWOxClffapr5QYMnZq6iMYmoff+ZL6yAE lYMXg/tIOPKw8yw8o9TqFKvclGuSyWVS7N47J6CA= 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 4.19 164/273] dmaengine: ste_dma40: Add missing IRQ check in d40_probe Date: Wed, 20 Sep 2023 13:30:04 +0200 Message-ID: <20230920112851.590817719@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230920112846.440597133@linuxfoundation.org> References: <20230920112846.440597133@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 4.19-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 e588dc5daaa80..e9d76113c9e95 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3584,6 +3584,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