瀏覽代碼

dmaengine: edma: Fix paRAM slot allocation for entry channel 0

edma_alloc_slot was not checking the channel mapping support existence when
slot 0 has been requested (used as entry slot for channel/event 0).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Peter Ujfalusi 9 年之前
父節點
當前提交
d20313b2c4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/dma/edma.c

+ 1 - 1
drivers/dma/edma.c

@@ -484,7 +484,7 @@ static void edma_read_slot(struct edma_cc *ecc, unsigned slot,
  */
  */
 static int edma_alloc_slot(struct edma_cc *ecc, int slot)
 static int edma_alloc_slot(struct edma_cc *ecc, int slot)
 {
 {
-	if (slot > 0) {
+	if (slot >= 0) {
 		slot = EDMA_CHAN_SLOT(slot);
 		slot = EDMA_CHAN_SLOT(slot);
 		/* Requesting entry paRAM slot for a HW triggered channel. */
 		/* Requesting entry paRAM slot for a HW triggered channel. */
 		if (ecc->chmap_exist && slot < ecc->num_channels)
 		if (ecc->chmap_exist && slot < ecc->num_channels)