[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230726115439.5640-1-machel@vivo.com>
Date: Wed, 26 Jul 2023 19:54:28 +0800
From: Wang Ming <machel@...o.com>
To: Ulf Hansson <ulf.hansson@...aro.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com, Wang Ming <machel@...o.com>
Subject: [PATCH v1] host: Use dev_err_probe instead of dev_err
It is possible that dma_request_chan will return EPROBE_DEFER,
which means that dev is not ready yet. In this case,
dev_err(dev), there will be no output. This patch fixes the bug.
Signed-off-by: Wang Ming <machel@...o.com>
---
drivers/mmc/host/pxamci.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 2a988f942b6c..4068cdbed7e4 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -712,16 +712,16 @@ static int pxamci_probe(struct platform_device *pdev)
host->dma_chan_rx = dma_request_chan(dev, "rx");
if (IS_ERR(host->dma_chan_rx)) {
- dev_err(dev, "unable to request rx dma channel\n");
- ret = PTR_ERR(host->dma_chan_rx);
+ ret = dev_err_probe(dev, PTR_ERR(host->dma_chan_rx),
+ "unable to request rx dma channel\n");
host->dma_chan_rx = NULL;
goto out;
}
host->dma_chan_tx = dma_request_chan(dev, "tx");
if (IS_ERR(host->dma_chan_tx)) {
- dev_err(dev, "unable to request tx dma channel\n");
- ret = PTR_ERR(host->dma_chan_tx);
+ ret = dev_err_probe(dev, PTR_ERR(host->dma_chan_tx),
+ "unable to request tx dma channel\n");
host->dma_chan_tx = NULL;
goto out;
}
--
2.25.1
Powered by blists - more mailing lists