Skip to content

Commit

Permalink
mtd: spi-nor: cadence-quadspi: Don't initialize rx_dma_complete on fa…
Browse files Browse the repository at this point in the history
…ilure

If driver fails to acquire DMA channel then don't initialize
rx_dma_complete struct as it won't be used.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Acked-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20200601070444.16923-4-vigneshr@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Vignesh Raghavendra authored and Mark Brown committed Jun 19, 2020
1 parent a997050 commit 48aae57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/spi-nor/controllers/cadence-quadspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ static void cqspi_request_mmap_dma(struct cqspi_st *cqspi)
if (IS_ERR(cqspi->rx_chan)) {
dev_err(&cqspi->pdev->dev, "No Rx DMA available\n");
cqspi->rx_chan = NULL;
return;
}
init_completion(&cqspi->rx_dma_complete);
}
Expand Down

0 comments on commit 48aae57

Please sign in to comment.