提交 aa3ee5f5 编写于 作者: A Axel Lin 提交者: 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: NAxel Lin <axel.lin@ingics.com>
Reviewed-by: NJun Nie <jun.nie@linaro.org>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册