public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Adeel Zahid <adeel.m.zahid@gmail.com>
To: Peter Rosin <peda@axentia.se>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Adeel Zahid <adeel.m.zahid@gmail.com>
Subject: [PATCH] i2c: muxes: i2c-mux-reg: use dev_err_probe() for deferred probe
Date: Sat,  4 Apr 2026 22:27:24 -0500	[thread overview]
Message-ID: <20260405032724.10085-1-adeel.m.zahid@gmail.com> (raw)

Use dev_err_probe() when the parent I2C adapter is not yet available.

This keeps deferred probe handling and logging consistent with the rest of the driver.

Signed-off-by: Adeel Zahid <adeel.m.zahid@gmail.com>
---
 drivers/i2c/muxes/i2c-mux-reg.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c
index 1e566ea92bc9..bff1b3783723 100644
--- a/drivers/i2c/muxes/i2c-mux-reg.c
+++ b/drivers/i2c/muxes/i2c-mux-reg.c
@@ -97,7 +97,8 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux,
 	adapter = of_find_i2c_adapter_by_node(adapter_np);
 	of_node_put(adapter_np);
 	if (!adapter)
-		return -EPROBE_DEFER;
+		return dev_err_probe(&pdev->dev, -EPROBE_DEFER,
+				     "failed to get parent adapter\n");
 
 	mux->data.parent = i2c_adapter_id(adapter);
 	put_device(&adapter->dev);
@@ -177,7 +178,8 @@ static int i2c_mux_reg_probe(struct platform_device *pdev)
 
 	parent = i2c_get_adapter(mux->data.parent);
 	if (!parent)
-		return -EPROBE_DEFER;
+		return dev_err_probe(&pdev->dev, -EPROBE_DEFER,
+				     "failed to get parent adapter\n");
 
 	if (!mux->data.reg) {
 		dev_info(&pdev->dev,
-- 
2.43.0


                 reply	other threads:[~2026-04-05  3:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260405032724.10085-1-adeel.m.zahid@gmail.com \
    --to=adeel.m.zahid@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox