Commit aa3ee5f5 authored by Axel Lin's avatar Axel Lin Committed by Vinod Koul

dmaengine: zxdma: Fix off-by-one for testing valid pchan request

The valid pchan range is 0 ~ d->dma_requests - 1.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Reviewed-by: default avatarJun Nie <jun.nie@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 0be2136b
......@@ -739,7 +739,7 @@ static struct dma_chan *zx_of_dma_simple_xlate(struct of_phandle_args *dma_spec,
struct dma_chan *chan;
struct zx_dma_chan *c;
if (request > d->dma_requests)
if (request >= d->dma_requests)
return NULL;
chan = dma_get_any_slave_channel(&d->slave);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment