Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a358f50 authored by Gomonovych, Vasyl's avatar Gomonovych, Vasyl Committed by Vinod Koul
Browse files

dmaengine: cppi41: Fix channel queues array size check



The test should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().

Signed-off-by: default avatarVasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 4fbd8d19
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;