summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi-nor
diff options
context:
space:
mode:
authorVignesh Raghavendra <vigneshr@ti.com>2020-06-01 12:34:39 +0530
committerMark Brown <broonie@kernel.org>2020-06-19 14:26:49 +0100
commit48aae57f0f9f57797772bd462b4d64902b1b4ae1 (patch)
treef519926af7b96cfd5f133796d5c2faf0994d3f4c /drivers/mtd/spi-nor
parenta99705079a91e6373122bd0ca2fc129b688fc5b3 (diff)
mtd: spi-nor: cadence-quadspi: Don't initialize rx_dma_complete on failure
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>
Diffstat (limited to 'drivers/mtd/spi-nor')
-rw-r--r--drivers/mtd/spi-nor/controllers/cadence-quadspi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/controllers/cadence-quadspi.c b/drivers/mtd/spi-nor/controllers/cadence-quadspi.c
index 8a9e17f79d8d..379e22c11c87 100644
--- a/drivers/mtd/spi-nor/controllers/cadence-quadspi.c
+++ b/drivers/mtd/spi-nor/controllers/cadence-quadspi.c
@@ -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);
}