Commit 96189475 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

spi: atmel: 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: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200901152713.18629-3-krzk@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 687a2e76
...@@ -513,9 +513,8 @@ static int atmel_spi_configure_dma(struct spi_master *master, ...@@ -513,9 +513,8 @@ static int atmel_spi_configure_dma(struct spi_master *master,
master->dma_tx = dma_request_chan(dev, "tx"); master->dma_tx = dma_request_chan(dev, "tx");
if (IS_ERR(master->dma_tx)) { if (IS_ERR(master->dma_tx)) {
err = PTR_ERR(master->dma_tx); err = dev_err_probe(dev, PTR_ERR(master->dma_tx),
if (err != -EPROBE_DEFER) "No TX DMA channel, DMA is disabled\n");
dev_err(dev, "No TX DMA channel, DMA is disabled\n");
goto error_clear; goto error_clear;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment