]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: mediatek: mtk-hsdma: Fix a resource leak in the error handling path of...
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 19 Dec 2020 12:47:18 +0000 (13:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 13:04:21 +0000 (14:04 +0100)
commit2d52bed9396ac4de527419c9cbb9a821a75c4601
tree673eac87a4c3025b40772c2b2ea35a177a6e26e8
parent9b5a7943f74f4e169446cdc19085558c5a9cd022
dmaengine: mediatek: mtk-hsdma: Fix a resource leak in the error handling path of the probe function

commit 33cbd54dc515cc04b5a603603414222b4bb1448d 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: 548c4597e984 ("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>
drivers/dma/mediatek/mtk-hsdma.c