mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
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: 8d318a50b3
("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>
This commit is contained in:
parent
1fbda5f4c7
commit
c05ce6907b
@ -3590,6 +3590,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user