Revert "iio: buffer-dmaengine: fix releasing dma channel on error"
This reverts commit 776ddbde62
.
This commit is contained in:
parent
08390b1a41
commit
caee88ae5f
1 changed files with 1 additions and 3 deletions
|
@ -180,7 +180,7 @@ static struct iio_buffer *iio_dmaengine_buffer_alloc(struct device *dev,
|
||||||
|
|
||||||
ret = dma_get_slave_caps(chan, &caps);
|
ret = dma_get_slave_caps(chan, &caps);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto err_release;
|
goto err_free;
|
||||||
|
|
||||||
/* Needs to be aligned to the maximum of the minimums */
|
/* Needs to be aligned to the maximum of the minimums */
|
||||||
if (caps.src_addr_widths)
|
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;
|
return &dmaengine_buffer->queue.buffer;
|
||||||
|
|
||||||
err_release:
|
|
||||||
dma_release_channel(chan);
|
|
||||||
err_free:
|
err_free:
|
||||||
kfree(dmaengine_buffer);
|
kfree(dmaengine_buffer);
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
|
|
Loading…
Reference in a new issue