dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 7 Jan 2024 10:02:04 +0000 (11:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:10:42 +0000 (19:10 +0100)
commit5cd8a51517ce15edbdcea4fc74c4c127ddaa1bd6
treefe72711280e33bd37d3c1fac6b72775f4280dabb
parentdf6a1dc71c1d0668d0b6f4474e2d4b1f04c9be92
dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA

[ Upstream commit 3aa58cb51318e329d203857f7a191678e60bb714 ]

This dma_alloc_coherent() is undone neither in the remove function, nor in
the error handling path of fsl_qdma_probe().

Switch to the managed version to fix both issues.

Fixes: b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/7f66aa14f59d32b13672dde28602b47deb294e1f.1704621515.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/fsl-qdma.c