diff mbox series

i2c: qcom-geni: Use dev_err_probe() for GPI DMA error

Message ID 20220412212601.2384274-1-bjorn.andersson@linaro.org
State Accepted
Commit c60bd968c74749a85c71dfed5fabd3e36d487d54
Headers show
Series i2c: qcom-geni: Use dev_err_probe() for GPI DMA error | expand

Commit Message

Bjorn Andersson April 12, 2022, 9:26 p.m. UTC
The GPI DMA engine driver can be compiled as a module, in which case the
likely probe deferral "error" shows up in the kernel log. Switch to
using dev_err_probe() to silence this warning and to ensure that
"devices_deferred" in debugfs carries this information.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/i2c/busses/i2c-qcom-geni.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Wolfram Sang April 15, 2022, 9:20 p.m. UTC | #1
On Tue, Apr 12, 2022 at 02:26:01PM -0700, Bjorn Andersson wrote:
> The GPI DMA engine driver can be compiled as a module, in which case the
> likely probe deferral "error" shows up in the kernel log. Switch to
> using dev_err_probe() to silence this warning and to ensure that
> "devices_deferred" in debugfs carries this information.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Applied to for-current, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index fc1dcc19f2a1..5b920f0fc7dd 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -843,10 +843,8 @@  static int geni_i2c_probe(struct platform_device *pdev)
 		/* FIFO is disabled, so we can only use GPI DMA */
 		gi2c->gpi_mode = true;
 		ret = setup_gpi_dma(gi2c);
-		if (ret) {
-			dev_err(dev, "Failed to setup GPI DMA mode:%d ret\n", ret);
-			return ret;
-		}
+		if (ret)
+			return dev_err_probe(dev, ret, "Failed to setup GPI DMA mode\n");
 
 		dev_dbg(dev, "Using GPI DMA mode for I2C\n");
 	} else {