mirror of https://gitee.com/openkylin/linux.git
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: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200901152713.18629-3-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
687a2e7618
commit
9618947582
|
@ -513,9 +513,8 @@ static int atmel_spi_configure_dma(struct spi_master *master,
|
|||
|
||||
master->dma_tx = dma_request_chan(dev, "tx");
|
||||
if (IS_ERR(master->dma_tx)) {
|
||||
err = PTR_ERR(master->dma_tx);
|
||||
if (err != -EPROBE_DEFER)
|
||||
dev_err(dev, "No TX DMA channel, DMA is disabled\n");
|
||||
err = dev_err_probe(dev, PTR_ERR(master->dma_tx),
|
||||
"No TX DMA channel, DMA is disabled\n");
|
||||
goto error_clear;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue