Skip to content

Commit

Permalink
dmaengine: fsldma: Fix a resource leak in the remove function
Browse files Browse the repository at this point in the history
[ Upstream commit cbc0ad0 ]

A 'irq_dispose_mapping()' call is missing in the remove function.
Add it.

This is needed to undo the 'irq_of_parse_and_map() call from the probe
function and already part of the error handling path of the probe function.

It was added in the probe function only in commit d3f620b ("fsldma:
simplify IRQ probing and handling")

Fixes: 77cd62e ("fsldma: allow Freescale Elo DMA driver to be compiled as a module")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20201212160516.92515-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tititiou36 authored and gregkh committed Mar 4, 2021
1 parent 9703b65 commit 1cc37e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/dma/fsldma.c
Expand Up @@ -1314,6 +1314,7 @@ static int fsldma_of_remove(struct platform_device *op)
if (fdev->chan[i])
fsl_dma_chan_remove(fdev->chan[i]);
}
irq_dispose_mapping(fdev->irq);

iounmap(fdev->regs);
kfree(fdev);
Expand Down

0 comments on commit 1cc37e5

Please sign in to comment.