Skip to content

Commit e267a5b

Browse files
tq-steinabroonie
authored andcommitted
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 <[email protected]> Reviewed-by: Francesco Dolcini <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 574bf7b commit e267a5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/spi/spi-imx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
13441344
controller->dma_tx = dma_request_chan(dev, "tx");
13451345
if (IS_ERR(controller->dma_tx)) {
13461346
ret = PTR_ERR(controller->dma_tx);
1347-
dev_dbg(dev, "can't get the TX DMA channel, error %d!\n", ret);
1347+
dev_err_probe(dev, ret, "can't get the TX DMA channel!\n");
13481348
controller->dma_tx = NULL;
13491349
goto err;
13501350
}
@@ -1353,7 +1353,7 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
13531353
controller->dma_rx = dma_request_chan(dev, "rx");
13541354
if (IS_ERR(controller->dma_rx)) {
13551355
ret = PTR_ERR(controller->dma_rx);
1356-
dev_dbg(dev, "can't get the RX DMA channel, error %d\n", ret);
1356+
dev_err_probe(dev, ret, "can't get the RX DMA channel!\n");
13571357
controller->dma_rx = NULL;
13581358
goto err;
13591359
}

0 commit comments

Comments
 (0)