Commit 18168291 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mark Brown

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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200429075855.104487-1-weiyongjun1@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f84b604d
...@@ -716,8 +716,10 @@ static int uniphier_spi_probe(struct platform_device *pdev) ...@@ -716,8 +716,10 @@ static int uniphier_spi_probe(struct platform_device *pdev)
master->dma_tx = dma_request_chan(&pdev->dev, "tx"); master->dma_tx = dma_request_chan(&pdev->dev, "tx");
if (IS_ERR_OR_NULL(master->dma_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; goto out_disable_clk;
}
master->dma_tx = NULL; master->dma_tx = NULL;
dma_tx_burst = INT_MAX; dma_tx_burst = INT_MAX;
} else { } else {
...@@ -732,8 +734,10 @@ static int uniphier_spi_probe(struct platform_device *pdev) ...@@ -732,8 +734,10 @@ static int uniphier_spi_probe(struct platform_device *pdev)
master->dma_rx = dma_request_chan(&pdev->dev, "rx"); master->dma_rx = dma_request_chan(&pdev->dev, "rx");
if (IS_ERR_OR_NULL(master->dma_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; goto out_disable_clk;
}
master->dma_rx = NULL; master->dma_rx = NULL;
dma_rx_burst = INT_MAX; dma_rx_burst = INT_MAX;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment