diff options
author | Minjie Du <duminjie@vivo.com> | 2023-07-25 05:50:37 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-07-25 13:14:30 +0200 |
commit | 908e5a3d4e6f60fa2d3912be7087e745639c4404 (patch) | |
tree | 4e07c36e00a8c9b42e7baa0cb592489aaa863975 | |
parent | spi: lpspi: Add power-domains to the DT bindings (diff) | |
download | linux-908e5a3d4e6f60fa2d3912be7087e745639c4404.tar.xz linux-908e5a3d4e6f60fa2d3912be7087e745639c4404.zip |
spi: fsl-dspi: Use dev_err_probe() in dspi_request_dma()
It is possible for dma_request_chan() to return EPROBE_DEFER, which means
dev is not ready yet.
At this point dev_err() will have no output.
Signed-off-by: Minjie Du <duminjie@vivo.com>
Link: https://lore.kernel.org/r/20230725035038.1702-1-duminjie@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-fsl-dspi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index ca41c8a8ba42..150d2ebf234b 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -503,15 +503,14 @@ static int dspi_request_dma(struct fsl_dspi *dspi, phys_addr_t phy_addr) dma->chan_rx = dma_request_chan(dev, "rx"); if (IS_ERR(dma->chan_rx)) { - dev_err(dev, "rx dma channel not available\n"); - ret = PTR_ERR(dma->chan_rx); - return ret; + return dev_err_probe(dev, PTR_ERR(dma->chan_rx), + "rx dma channel not available\n"); } dma->chan_tx = dma_request_chan(dev, "tx"); if (IS_ERR(dma->chan_tx)) { - dev_err(dev, "tx dma channel not available\n"); ret = PTR_ERR(dma->chan_tx); + dev_err_probe(dev, ret, "tx dma channel not available\n"); goto err_tx_channel; } |