]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: mt7621-dma: Fix a resource leak in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 13 Dec 2020 15:35:13 +0000 (16:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jan 2021 19:16:18 +0000 (20:16 +0100)
commit70cf59b8ffb4899b991e4f9668af0ea999ae1b60
treef0d23cb512a1f83288248284aa201c7a1a979795
parentc511f27e130e801e9f5e58d2865bb6f3a5ab5e7c
staging: mt7621-dma: Fix a resource leak in an error handling path

commit d887d6104adeb94d1b926936ea21f07367f0ff9f upstream.

If an error occurs after calling 'mtk_hsdma_init()', it must be undone by
a corresponding call to 'mtk_hsdma_uninit()' as already done in the
remove function.

Fixes: 0853c7a53eb3 ("staging: mt7621-dma: ralink: add rt2880 dma engine")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201213153513.138723-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-dma/mtk-hsdma.c