Re: [PATCH] dmaengine: zxdma: Fix off-by-one for testing valid pchan request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2015-09-26 17:15 GMT+08:00 Axel Lin <axel.lin@xxxxxxxxxx>:
> The valid pchan range is 0 ~ d->dma_requests - 1.
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
> ---
>  drivers/dma/zx296702_dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/zx296702_dma.c b/drivers/dma/zx296702_dma.c
> index 39915a6..c017fcd 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);
> --
> 2.1.4
>
>
>

Reviewed-by: Jun Nie <jun.nie@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux