Skip to content

Commit

Permalink
dmaengine: edma: Fix paRAM slot allocation for entry channel 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Ujfalusi authored and Vinod Koul committed Jan 13, 2016
1 parent 8b64843 commit d20313b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d20313b

Please sign in to comment.