]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dmaengine: imx-sdma: remove unused variable
authorVinod Koul <vkoul@kernel.org>
Mon, 2 Jul 2018 13:12:51 +0000 (18:42 +0530)
committerVinod Koul <vkoul@kernel.org>
Mon, 2 Jul 2018 13:12:51 +0000 (18:42 +0530)
The variable is no longer used, though it is set, so remove it

drivers/dma/imx-sdma.c:1298:6:
warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
  int ret, i, count;
      ^~~

Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/imx-sdma.c

index dfd1fbbe7ba8fb77d95cd7e9f0efe99eb8e85a07..b78146b4ea013c27417bb4aac20462378ee83ade 100644 (file)
@@ -1295,7 +1295,7 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
 {
        struct sdma_channel *sdmac = to_sdma_chan(chan);
        struct sdma_engine *sdma = sdmac->sdma;
-       int ret, i, count;
+       int i, count;
        int channel = sdmac->channel;
        struct scatterlist *sg;
        struct sdma_desc *desc;
@@ -1318,17 +1318,14 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
                if (count > 0xffff) {
                        dev_err(sdma->dev, "SDMA channel %d: maximum bytes for sg entry exceeded: %d > %d\n",
                                        channel, count, 0xffff);
-                       ret = -EINVAL;
                        goto err_bd_out;
                }
 
                bd->mode.count = count;
                desc->chn_count += count;
 
-               if (sdmac->word_size > DMA_SLAVE_BUSWIDTH_4_BYTES) {
-                       ret =  -EINVAL;
+               if (sdmac->word_size > DMA_SLAVE_BUSWIDTH_4_BYTES)
                        goto err_bd_out;
-               }
 
                switch (sdmac->word_size) {
                case DMA_SLAVE_BUSWIDTH_4_BYTES: