提交 5a358f50 编写于 作者: G Gomonovych, Vasyl 提交者: Vinod Koul

dmaengine: cppi41: Fix channel queues array size check

The test should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().
Signed-off-by: NVasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 4fbd8d19
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册