diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-28 13:48:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-28 15:46:33 -0700 |
commit | 2d17f7fb693bfb197d1e7007f2060deba78ae675 (patch) | |
tree | a802977633788b567bbf541439738c359b967480 /drivers/dma/cppi41.c | |
parent | ff49896aa45de286f3cbfda800fc92665374546a (diff) |
dma: cppi41: off by one in desc_to_chan()
The test here should be ">=" instead of ">". The cdd->chan_busy[] array
has "ALLOC_DECS_NUM" elements.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma/cppi41.c')
-rw-r--r-- | drivers/dma/cppi41.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index 6c4e64f2f3e..7c82b92f9b1 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c @@ -242,7 +242,7 @@ static struct cppi41_channel *desc_to_chan(struct cppi41_dd *cdd, u32 desc) } desc_num = (desc - cdd->descs_phys) / sizeof(struct cppi41_desc); - BUG_ON(desc_num > ALLOC_DECS_NUM); + BUG_ON(desc_num >= ALLOC_DECS_NUM); c = cdd->chan_busy[desc_num]; cdd->chan_busy[desc_num] = NULL; return c; |