mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Reviewed-by: Jun Nie <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
parent
0be2136b67
commit
aa3ee5f569
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue