public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
To: linux-i2c@vger.kernel.org
Cc: Tomasz Bachorski <tomasz.bachorski@nokia.com>,
	Wolfram Sang <wsa@the-dreams.de>, Peter Rosin <peda@axentia.se>,
	Alexander Sverdlin <alexander.sverdlin@nokia.com>
Subject: [PATCH] i2c: mux: reg: don't log an error for probe deferral
Date: Tue, 12 Dec 2017 11:12:03 +0100	[thread overview]
Message-ID: <20171212101203.22125-1-alexander.sverdlin@nokia.com> (raw)

From: Tomasz Bachorski <tomasz.bachorski@nokia.com>

It's possible that i2c_mux_reg_probe_dt() could return -EPROBE_DEFER.
In that case, driver will request a probe deferral and an error
suggesting device tree parsing problem will be reported. This is
a pretty confusing information. Let's change the error handling,
so driver will be able to request probe deferral without logging
not related errors.

Signed-off-by: Tomasz Bachorski <tomasz.bachorski@nokia.com>
---
 drivers/i2c/muxes/i2c-mux-reg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c
index f6c9c3dc6cad..e0be96e77231 100644
--- a/drivers/i2c/muxes/i2c-mux-reg.c
+++ b/drivers/i2c/muxes/i2c-mux-reg.c
@@ -177,7 +177,9 @@ static int i2c_mux_reg_probe(struct platform_device *pdev)
 			sizeof(mux->data));
 	} else {
 		ret = i2c_mux_reg_probe_dt(mux, pdev);
-		if (ret < 0) {
+		if (ret == -EPROBE_DEFER) {
+			return ret;
+		} else if (ret < 0) {
 			dev_err(&pdev->dev, "Error parsing device tree");
 			return ret;
 		}
-- 
2.13.2

             reply	other threads:[~2017-12-12 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 10:12 Alexander Sverdlin [this message]
2017-12-12 10:43 ` [PATCH] i2c: mux: reg: don't log an error for probe deferral Peter Rosin

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=20171212101203.22125-1-alexander.sverdlin@nokia.com \
    --to=alexander.sverdlin@nokia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=tomasz.bachorski@nokia.com \
    --cc=wsa@the-dreams.de \
    /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