Skip to content

Commit 4ad5dd2

Browse files
bumyongleevinodkoul
authored andcommitted
dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc
flags varible which is the input parameter of pl330_prep_dma_cyclic() should not be used by spinlock_irq[save/restore] function. Signed-off-by: Jongho Park <[email protected]> Signed-off-by: Bumyong Lee <[email protected]> Signed-off-by: Chanho Park <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: f6f2421 ("dmaengine: pl330: Merge dma_pl330_dmac and pl330_dmac structs") Cc: [email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 17866bc commit 4ad5dd2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/dma/pl330.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,13 +2694,15 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
26942694
for (i = 0; i < len / period_len; i++) {
26952695
desc = pl330_get_desc(pch);
26962696
if (!desc) {
2697+
unsigned long iflags;
2698+
26972699
dev_err(pch->dmac->ddma.dev, "%s:%d Unable to fetch desc\n",
26982700
__func__, __LINE__);
26992701

27002702
if (!first)
27012703
return NULL;
27022704

2703-
spin_lock_irqsave(&pl330->pool_lock, flags);
2705+
spin_lock_irqsave(&pl330->pool_lock, iflags);
27042706

27052707
while (!list_empty(&first->node)) {
27062708
desc = list_entry(first->node.next,
@@ -2710,7 +2712,7 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
27102712

27112713
list_move_tail(&first->node, &pl330->desc_pool);
27122714

2713-
spin_unlock_irqrestore(&pl330->pool_lock, flags);
2715+
spin_unlock_irqrestore(&pl330->pool_lock, iflags);
27142716

27152717
return NULL;
27162718
}

0 commit comments

Comments
 (0)