diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-cadence-quadspi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 4828da4587c5..3d7bf62da11c 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1878,8 +1878,11 @@ static int cqspi_probe(struct platform_device *pdev) } ret = devm_pm_runtime_enable(dev); - if (ret) - return ret; + if (ret) { + if (cqspi->rx_chan) + dma_release_channel(cqspi->rx_chan); + goto probe_setup_failed; + } pm_runtime_set_autosuspend_delay(dev, CQSPI_AUTOSUSPEND_TIMEOUT); pm_runtime_use_autosuspend(dev); |