From: Jean-Francois Moine Date: Thu, 28 Apr 2016 15:09:14 +0000 (+0200) Subject: dmaengine: sun6i: Remove useless check X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=3435fb18533c27b288c19cfb7fe783e5433e36aa;p=deliverable%2Flinux.git dmaengine: sun6i: Remove useless check The transfer direction is now checked in set_config. There is no need to check it twice. Signed-off-by: Jean-Francois Moine Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index cd436c6a29a7..80e426d9da5d 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -585,11 +585,6 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg( if (!sgl) return NULL; - if (!is_slave_direction(dir)) { - dev_err(chan2dev(chan), "Invalid DMA direction\n"); - return NULL; - } - ret = set_config(sdev, sconfig, dir, &lli_cfg); if (ret) { dev_err(chan2dev(chan), "Invalid DMA configuration\n");