浏览代码

更新ark-axi-dma.c解决播放音乐卡死问题

luyuan_t440 3 年之前
父节点
当前提交
05f7236d43
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      linux/drivers/dma/ark-axi-dma.c

+ 5 - 0
linux/drivers/dma/ark-axi-dma.c

@@ -967,6 +967,11 @@ static void axi_chan_block_xfer_complete(struct axi_dma_chan *chan)
 	/* The completed descriptor currently is in the head of vc list */
 	vd = vchan_next_desc(&chan->vc);
 
+	if (!vd) {
+		spin_unlock_irqrestore(&chan->vc.lock, flags);
+		return;
+	}
+
 	if (chan->cyclic) {
 		desc = vd_to_axi_desc(vd);
 		if (desc) {