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

[ Upstream commit 968bc1d7203d384e72afe34124a1801b7af76514 ]

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

Switch to the managed version to fix the issue in the probe and simplify
the remove function.

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/a0ef5d0f5a47381617ef339df776ddc68ce48173.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