]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: omap-dma: fix dma_pool resource leak in error paths
authorHaotian Zhang <vulab@iscas.ac.cn>
Mon, 3 Nov 2025 07:30:18 +0000 (15:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 10:18:42 +0000 (11:18 +0100)
commit4b93712e96be17029bd22787f2e39feb0e73272c
tree0259edf1e6530e8fdcc698040a1dda8c35ae5b16
parent69566a1b88d912fea98a84bb122088d55f23b17d
dmaengine: omap-dma: fix dma_pool resource leak in error paths

[ Upstream commit 2e1136acf8a8887c29f52e35a77b537309af321f ]

The dma_pool created by dma_pool_create() is not destroyed when
dma_async_device_register() or of_dma_controller_register() fails,
causing a resource leak in the probe error paths.

Add dma_pool_destroy() in both error paths to properly release the
allocated dma_pool resource.

Fixes: 7bedaa553760 ("dmaengine: add OMAP DMA engine driver")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251103073018.643-1-vulab@iscas.ac.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/ti/omap-dma.c