@@ -112,11 +112,11 @@ static void re_jr_issue_pending(struct dma_chan *chan)
jr = container_of(chan, struct re_jr, chan);
+ spin_lock_irqsave(&jr->desc_lock, flags);
avail = RE_JR_INB_SLOT_AVAIL(in_be32(&jr->jrregs->inbring_slot_avail));
if (!avail)
- return;
+ goto out;
- spin_lock_irqsave(&jr->desc_lock, flags);
list_for_each_entry_safe(desc, _desc, &jr->submit_q, node) {
if (!avail)
break;
@@ -132,6 +132,7 @@ static void re_jr_issue_pending(struct dma_chan *chan)
out_be32(&jr->jrregs->inbring_add_job, RE_JR_INB_JOB_ADD(1));
avail--;
}
+out:
spin_unlock_irqrestore(&jr->desc_lock, flags);
}