diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-09-26 17:15:47 +0800 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-10-01 07:42:27 +0530 |
commit | aa3ee5f569fda51e54c224c0df60e187e9c5e582 (patch) | |
tree | df659cc3fe3093b686ec5fd3675358aedcad562b /drivers | |
parent | 0be2136b67067617b36c70e525d7534108361e36 (diff) |
dmaengine: zxdma: Fix off-by-one for testing valid pchan request
The valid pchan range is 0 ~ d->dma_requests - 1.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/zx296702_dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/zx296702_dma.c b/drivers/dma/zx296702_dma.c index 39915a6b7986..c017fcd8e07c 100644 --- a/drivers/dma/zx296702_dma.c +++ b/drivers/dma/zx296702_dma.c @@ -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); |