]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: ti: k3-udma: Fix a resource leak in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 24 Jan 2021 07:09:23 +0000 (08:09 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 26 Jan 2021 17:31:32 +0000 (23:01 +0530)
commit97d0e1f631e5d016d56aabbee21a604c80e5d7e1
tree5ad2f3cc864294574874779b27fe35339960e91f
parent8c33ad0da254c8eecafb20a01a52b17c23232f66
dmaengine: ti: k3-udma: Fix a resource leak in an error handling path

In 'dma_pool_create()', we return -ENOMEM, but don't release the resources
already allocated, as in all the other error handling paths.

Go to 'err_res_free' instead of returning directly.

Fixes: c6b0d5f92b07 ("dmaengine: ti: k3-udma: Initial support for K3 BCDMA")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20210124070923.724479-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ti/k3-udma.c