Skip to content

Commit ceb97fb

Browse files
tititiou36gregkh
authored andcommitted
dmaengine: mediatek: mtk-hsdma: Fix a resource leak in the error handling path of the probe function
commit 33cbd54 upstream. 'mtk_hsdma_hw_deinit()' should be called in the error handling path of the probe function to undo a previous 'mtk_hsdma_hw_init()' call, as already done in the remove function. Fixes: 548c459 ("dmaengine: mediatek: Add MediaTek High-Speed DMA controller for MT7622 and MT7623 SoC") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20201219124718.182664-1-christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fcd04aa commit ceb97fb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/dma/mediatek/mtk-hsdma.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
10071007
return 0;
10081008

10091009
err_free:
1010+
mtk_hsdma_hw_deinit(hsdma);
10101011
of_dma_controller_free(pdev->dev.of_node);
10111012
err_unregister:
10121013
dma_async_device_unregister(dd);

0 commit comments

Comments
 (0)