Skip to content

Commit 962411b

Browse files
wenwenwang1vinodkoul
authored andcommitted
dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe()
If devm_request_irq() fails to disable all interrupts, no cleanup is performed before retuning the error. To fix this issue, invoke omap_dma_free() to do the cleanup. Signed-off-by: Wenwen Wang <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 2c231c0 commit 962411b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/dma/ti/omap-dma.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1540,8 +1540,10 @@ static int omap_dma_probe(struct platform_device *pdev)
15401540

15411541
rc = devm_request_irq(&pdev->dev, irq, omap_dma_irq,
15421542
IRQF_SHARED, "omap-dma-engine", od);
1543-
if (rc)
1543+
if (rc) {
1544+
omap_dma_free(od);
15441545
return rc;
1546+
}
15451547
}
15461548

15471549
if (omap_dma_glbl_read(od, CAPS_0) & CAPS_0_SUPPORT_LL123)

0 commit comments

Comments
 (0)