Skip to contentSkip to conversation

dmaengine: mediatek: Re-enable IRQs in mtk_cqdma_tx_status()

PATCH New Dan Carpenter 1 participant 1 message May 23, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: mediatek: Re-enable IRQs in mtk_cqdma_tx_status()

This code calls spin_lock_irqsave() twice but obviously we can't store two sets of flags in the same "flags" variable. The result is that we never re-enable IRQs in mtk_cqdma_tx_status().

Fixes 157ae5ffd76a ("dmaengine: mediatek: Fix a possible deadlock error in mtk_cqdma_tx_status()")
---
 drivers/dma/mediatek/mtk-cqdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/mediatek/mtk-cqdma.c +2 -2
index 47c8adfdc155..9f0c41ca7770 100644
@@ -449,9 +449,9 @@ static enum dma_status mtk_cqdma_tx_status(struct dma_chan *c,
 		return ret;
 
 	spin_lock_irqsave(&cvc->pc->lock, flags);
-	spin_lock_irqsave(&cvc->vc.lock, flags);
+	spin_lock(&cvc->vc.lock);
 	vd = mtk_cqdma_find_active_desc(c, cookie);
-	spin_unlock_irqrestore(&cvc->vc.lock, flags);
+	spin_unlock(&cvc->vc.lock);
 	spin_unlock_irqrestore(&cvc->pc->lock, flags);
 
 	if (vd) {
Signature · 1 line
2.47.2