diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2020-04-29 07:58:55 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-04-29 18:52:15 +0100 |
commit | 18168291aa7dd48e9d9e3cbb1d4cd06e899357ca (patch) | |
tree | e8c687f049c2a54bfb9fcf0aceced2dc4e664450 /drivers/spi/spi-uniphier.c | |
parent | f84b604dbaf242d17135f527dbe81093a41226b3 (diff) |
spi: uniphier: fix error return code in uniphier_spi_probe()
Fix to return negative error code -EPROBE_DEFER from the DMA probe defer
error handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200429075855.104487-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-uniphier.c')
-rw-r--r-- | drivers/spi/spi-uniphier.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/spi/spi-uniphier.c b/drivers/spi/spi-uniphier.c index 0fa50979644d..0457d3376873 100644 --- a/drivers/spi/spi-uniphier.c +++ b/drivers/spi/spi-uniphier.c @@ -716,8 +716,10 @@ static int uniphier_spi_probe(struct platform_device *pdev) master->dma_tx = dma_request_chan(&pdev->dev, "tx"); if (IS_ERR_OR_NULL(master->dma_tx)) { - if (PTR_ERR(master->dma_tx) == -EPROBE_DEFER) + if (PTR_ERR(master->dma_tx) == -EPROBE_DEFER) { + ret = -EPROBE_DEFER; goto out_disable_clk; + } master->dma_tx = NULL; dma_tx_burst = INT_MAX; } else { @@ -732,8 +734,10 @@ static int uniphier_spi_probe(struct platform_device *pdev) master->dma_rx = dma_request_chan(&pdev->dev, "rx"); if (IS_ERR_OR_NULL(master->dma_rx)) { - if (PTR_ERR(master->dma_rx) == -EPROBE_DEFER) + if (PTR_ERR(master->dma_rx) == -EPROBE_DEFER) { + ret = -EPROBE_DEFER; goto out_disable_clk; + } master->dma_rx = NULL; dma_rx_burst = INT_MAX; } else { |