mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
spi: spi-imx: Use dev_err_probe for failed DMA channel requests
If dma_request_chan() fails, no error is shown nor any information is shown in /sys/kernel/debug/devices_deferred if -EPROBE_DEFER is returned. Use dev_err_probe to fix both problems. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Link: https://msgid.link/r/20240110085403.457089-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
574bf7bbe8
commit
e267a5b3ec
@ -1344,7 +1344,7 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
|
||||
controller->dma_tx = dma_request_chan(dev, "tx");
|
||||
if (IS_ERR(controller->dma_tx)) {
|
||||
ret = PTR_ERR(controller->dma_tx);
|
||||
dev_dbg(dev, "can't get the TX DMA channel, error %d!\n", ret);
|
||||
dev_err_probe(dev, ret, "can't get the TX DMA channel!\n");
|
||||
controller->dma_tx = NULL;
|
||||
goto err;
|
||||
}
|
||||
@ -1353,7 +1353,7 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
|
||||
controller->dma_rx = dma_request_chan(dev, "rx");
|
||||
if (IS_ERR(controller->dma_rx)) {
|
||||
ret = PTR_ERR(controller->dma_rx);
|
||||
dev_dbg(dev, "can't get the RX DMA channel, error %d\n", ret);
|
||||
dev_err_probe(dev, ret, "can't get the RX DMA channel!\n");
|
||||
controller->dma_rx = NULL;
|
||||
goto err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user