summaryrefslogtreecommitdiffstats
path: root/drivers/dma/ptdma
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2022-03-10 10:12:25 +0530
committerVinod Koul <vkoul@kernel.org>2022-03-10 10:12:25 +0530
commit60c10db9b17330eb43b84a8051a77ab1e6074442 (patch)
tree3f696f5851e20c13446e6fade12217e542d8b472 /drivers/dma/ptdma
parentea7c8f598c323f6ebaf9ddae01fb2a981fe8c56a (diff)
parent455896c53d5b803733ddd84e1bf8a430644439b6 (diff)
downloadlinux-60c10db9b17330eb43b84a8051a77ab1e6074442.tar.bz2
Merge tag 'dmaengine-fix-5.17' into next
This merges dmaengine/dmaengine-fix-5.17 tag into next as that is already merged mainline and resolves depencency in patches
Diffstat (limited to 'drivers/dma/ptdma')
-rw-r--r--drivers/dma/ptdma/ptdma-dev.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/dma/ptdma/ptdma-dev.c b/drivers/dma/ptdma/ptdma-dev.c
index 8a6bf291a73f..daafea5bc35d 100644
--- a/drivers/dma/ptdma/ptdma-dev.c
+++ b/drivers/dma/ptdma/ptdma-dev.c
@@ -207,7 +207,7 @@ int pt_core_init(struct pt_device *pt)
if (!cmd_q->qbase) {
dev_err(dev, "unable to allocate command queue\n");
ret = -ENOMEM;
- goto e_dma_alloc;
+ goto e_destroy_pool;
}
cmd_q->qidx = 0;
@@ -229,8 +229,10 @@ int pt_core_init(struct pt_device *pt)
/* Request an irq */
ret = request_irq(pt->pt_irq, pt_core_irq_handler, 0, dev_name(pt->dev), pt);
- if (ret)
- goto e_pool;
+ if (ret) {
+ dev_err(dev, "unable to allocate an IRQ\n");
+ goto e_free_dma;
+ }
/* Update the device registers with queue information. */
cmd_q->qcontrol &= ~CMD_Q_SIZE;
@@ -250,21 +252,20 @@ int pt_core_init(struct pt_device *pt)
/* Register the DMA engine support */
ret = pt_dmaengine_register(pt);
if (ret)
- goto e_dmaengine;
+ goto e_free_irq;
/* Set up debugfs entries */
ptdma_debugfs_setup(pt);
return 0;
-e_dmaengine:
+e_free_irq:
free_irq(pt->pt_irq, pt);
-e_dma_alloc:
+e_free_dma:
dma_free_coherent(dev, cmd_q->qsize, cmd_q->qbase, cmd_q->qbase_dma);
-e_pool:
- dev_err(dev, "unable to allocate an IRQ\n");
+e_destroy_pool:
dma_pool_destroy(pt->cmd_q.dma_pool);
return ret;