Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe5dd395 authored by ruanjinjie's avatar ruanjinjie Committed by Greg Kroah-Hartman
Browse files

dmaengine: ste_dma40: Add missing IRQ check in d40_probe



[ 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: 8d318a50 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3")
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230724144108.2582917-1-ruanjinjie@huawei.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e0f2d85e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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) {