dmaengine: edma: Fix paRAM slot allocation for entry channel 0
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 11 Jan 2016 08:38:01 +0000 (10:38 +0200)
committerVinod Koul <vinod.koul@intel.com>
Wed, 13 Jan 2016 13:39:25 +0000 (19:09 +0530)
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>
drivers/dma/edma.c

index 6b3e9d9910102a2d65cd831bd5e6ec4374957bb7..bdb9339a91c712391fb3749ee3d1af3f20520760 100644 (file)
@@ -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)
 {
-       if (slot > 0) {
+       if (slot >= 0) {
                slot = EDMA_CHAN_SLOT(slot);
                /* Requesting entry paRAM slot for a HW triggered channel. */
                if (ecc->chmap_exist && slot < ecc->num_channels)