From caee88ae5f3980a8c224861ec066a3e413044dd2 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:23:38 +0100 Subject: [PATCH] Revert "iio: buffer-dmaengine: fix releasing dma channel on error" This reverts commit 776ddbde623c6866499edf8e065f480b5e0542c7. --- drivers/iio/buffer/industrialio-buffer-dmaengine.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c index 8aa6e1232..93b4e9e6b 100755 --- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c +++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c @@ -180,7 +180,7 @@ static struct iio_buffer *iio_dmaengine_buffer_alloc(struct device *dev, ret = dma_get_slave_caps(chan, &caps); if (ret < 0) - goto err_release; + goto err_free; /* Needs to be aligned to the maximum of the minimums */ if (caps.src_addr_widths) @@ -207,8 +207,6 @@ static struct iio_buffer *iio_dmaengine_buffer_alloc(struct device *dev, return &dmaengine_buffer->queue.buffer; -err_release: - dma_release_channel(chan); err_free: kfree(dmaengine_buffer); return ERR_PTR(ret);