Skip to content

Commit c05ce69

Browse files
ruanjinjie-engvinodkoul
authored andcommitted
dmaengine: ste_dma40: Add missing IRQ check in d40_probe
Check for the return value of platform_get_irq(): if no interrupt is specified, it wouldn't make sense to call request_irq(). Fixes: 8d318a5 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3") Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230724144108.2582917-1-ruanjinjie@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 1fbda5f commit c05ce69

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/dma/ste_dma40.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3590,6 +3590,10 @@ static int __init d40_probe(struct platform_device *pdev)
35903590
spin_lock_init(&base->lcla_pool.lock);
35913591

35923592
base->irq = platform_get_irq(pdev, 0);
3593+
if (base->irq < 0) {
3594+
ret = base->irq;
3595+
goto destroy_cache;
3596+
}
35933597

35943598
ret = request_irq(base->irq, d40_handle_interrupt, 0, D40_NAME, base);
35953599
if (ret) {

0 commit comments

Comments
 (0)