Skip to content

Commit 0aa4523

Browse files
advait-0vinodkoul
authored andcommitted
dmaengine: ep93xx: Fix unsigned compared against 0
An unsigned value can never be negative, so this test will always evaluate the same way. In ep93xx_dma_alloc_chan_resources: An unsigned dma_cfg.port's value is checked against EP93XX_DMA_I2S1 which is 0. Signed-off-by: Advait Dhamorikar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 662f045 commit 0aa4523

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/dma/ep93xx_dma.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,8 +929,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
929929

930930
/* Sanity check the channel parameters */
931931
if (!edmac->edma->m2m) {
932-
if (edmac->dma_cfg.port < EP93XX_DMA_I2S1 ||
933-
edmac->dma_cfg.port > EP93XX_DMA_IRDA)
932+
if (edmac->dma_cfg.port > EP93XX_DMA_IRDA)
934933
return -EINVAL;
935934
if (edmac->dma_cfg.dir != ep93xx_dma_chan_direction(chan))
936935
return -EINVAL;

0 commit comments

Comments
 (0)