Skip to content

Commit c05ce69

Browse files
ruanjinjievinodkoul
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 <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 1fbda5f commit c05ce69

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)