mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Marko <robimarko@gmail.com>
To: lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org
Cc: Robert Marko <robimarko@gmail.com>
Subject: [PATCH] regulator: userspace-consumer: quiet device deferral
Date: Sun, 23 Jun 2024 16:09:35 +0200	[thread overview]
Message-ID: <20240623140947.1252376-1-robimarko@gmail.com> (raw)

Trying to use userspace-consumer when the required supplies have not yet
been probed will throw an error message on deferral:
reg-userspace-consumer output-led-power: Failed to get supplies: -517

So, lets simply use dev_err_probe() instead of dev_err() to not print
errors in case when driver probe is being deferred.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 drivers/regulator/userspace-consumer.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/userspace-consumer.c b/drivers/regulator/userspace-consumer.c
index 86a626a4f610..6153d0295b6d 100644
--- a/drivers/regulator/userspace-consumer.c
+++ b/drivers/regulator/userspace-consumer.c
@@ -158,10 +158,8 @@ static int regulator_userspace_consumer_probe(struct platform_device *pdev)
 
 	ret = devm_regulator_bulk_get_exclusive(&pdev->dev, drvdata->num_supplies,
 						drvdata->supplies);
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to get supplies: %d\n", ret);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret, "Failed to get supplies\n");
 
 	platform_set_drvdata(pdev, drvdata);
 
-- 
2.45.2


             reply	other threads:[~2024-06-23 14:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 14:09 Robert Marko [this message]
2024-06-25 11:34 ` Mark Brown

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=20240623140947.1252376-1-robimarko@gmail.com \
    --to=robimarko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®