Unverified Commit 908e5a3d authored by Minjie Du's avatar Minjie Du Committed by Mark Brown
Browse files

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: default avatarMinjie Du <duminjie@vivo.com>
Link: https://lore.kernel.org/r/20230725035038.1702-1-duminjie@vivo.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 49aa7716
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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;
	}