summaryrefslogtreecommitdiff
path: root/drivers/dma/cppi41.c
diff options
context:
space:
mode:
authorGomonovych, Vasyl <gomonovych@gmail.com>2017-12-21 16:53:04 +0100
committerVinod Koul <vinod.koul@intel.com>2017-12-22 17:47:04 +0530
commit5a358f50c3cdeffc0ba877423295fd4e81f5b2bb (patch)
tree95d1962cdb6691add437ef579190747d7211e3f9 /drivers/dma/cppi41.c
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff)
dmaengine: cppi41: Fix channel queues array size check
The test should be >= ARRAY_SIZE() instead of > ARRAY_SIZE(). Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/cppi41.c')
-rw-r--r--drivers/dma/cppi41.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
index f7e965f63274..d9bee65a18a4 100644
--- a/drivers/dma/cppi41.c
+++ b/drivers/dma/cppi41.c
@@ -934,7 +934,7 @@ static bool cpp41_dma_filter_fn(struct dma_chan *chan, void *param)
BUILD_BUG_ON(ARRAY_SIZE(am335x_usb_queues_rx) !=
ARRAY_SIZE(am335x_usb_queues_tx));
- if (WARN_ON(cchan->port_num > ARRAY_SIZE(am335x_usb_queues_rx)))
+ if (WARN_ON(cchan->port_num >= ARRAY_SIZE(am335x_usb_queues_rx)))
return false;
cchan->q_num = queues[cchan->port_num].submit;