mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-23 13:50:42 +07:00
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>
This commit is contained in:
parent
a99705079a
commit
48aae57f0f
@ -1180,6 +1180,7 @@ static void cqspi_request_mmap_dma(struct cqspi_st *cqspi)
|
|||||||
if (IS_ERR(cqspi->rx_chan)) {
|
if (IS_ERR(cqspi->rx_chan)) {
|
||||||
dev_err(&cqspi->pdev->dev, "No Rx DMA available\n");
|
dev_err(&cqspi->pdev->dev, "No Rx DMA available\n");
|
||||||
cqspi->rx_chan = NULL;
|
cqspi->rx_chan = NULL;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
init_completion(&cqspi->rx_dma_complete);
|
init_completion(&cqspi->rx_dma_complete);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user