diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-09-01 17:27:07 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-08 19:19:26 +0200 |
commit | 436a5c208037a71f64f35312969e27a05d6d7c53 (patch) | |
tree | 6eea09165090dea040e5b3aab6c3ad069d5196fc /drivers/spi/spi-cadence-quadspi.c | |
parent | spi: bcm2835: Simplify with dev_err_probe() (diff) | |
download | linux-436a5c208037a71f64f35312969e27a05d6d7c53.tar.xz linux-436a5c208037a71f64f35312969e27a05d6d7c53.zip |
spi: cadence-quadspi: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200901152713.18629-5-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/spi/spi-cadence-quadspi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 1c1a9d17eec0..0e5e45951eb0 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1117,11 +1117,8 @@ static int cqspi_request_mmap_dma(struct cqspi_st *cqspi) cqspi->rx_chan = dma_request_chan_by_mask(&mask); if (IS_ERR(cqspi->rx_chan)) { int ret = PTR_ERR(cqspi->rx_chan); - - if (ret != -EPROBE_DEFER) - dev_err(&cqspi->pdev->dev, "No Rx DMA available\n"); cqspi->rx_chan = NULL; - return ret; + return dev_err_probe(&cqspi->pdev->dev, ret, "No Rx DMA available\n"); } init_completion(&cqspi->rx_dma_complete); |