Commit 2e1136a
dmaengine: omap-dma: fix dma_pool resource leak in error paths
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: 7bedaa5 ("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>1 parent 3f74700 commit 2e1136a
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1808 | 1808 | | |
1809 | 1809 | | |
1810 | 1810 | | |
| 1811 | + | |
| 1812 | + | |
1811 | 1813 | | |
1812 | 1814 | | |
1813 | 1815 | | |
| |||
1823 | 1825 | | |
1824 | 1826 | | |
1825 | 1827 | | |
| 1828 | + | |
| 1829 | + | |
1826 | 1830 | | |
1827 | 1831 | | |
1828 | 1832 | | |
| |||
0 commit comments