Skip to content

Commit

Permalink
dmaengine: imx-sdma: remove unused variable
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
vinodkoul committed Jul 2, 2018
1 parent c119987 commit ad78b00
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/dma/imx-sdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand Down

0 comments on commit ad78b00

Please sign in to comment.