mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regulator: Don't print error in devm_regulator_bulk_get() on -EPROBE_DEFER
@ 2016-03-15 20:35 Javier Martinez Canillas
  2016-03-16  9:59 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Javier Martinez Canillas @ 2016-03-15 20:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: Javier Martinez Canillas, Liam Girdwood, Mark Brown

The regulators may not be available just because their driver's probe was
not executed and the regulators were not registered yet. So don't print an
error in this case to avoid polluting the kernel log and confuse the users.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/regulator/devres.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c
index 6ad8ab4c578d..3d023422e228 100644
--- a/drivers/regulator/devres.c
+++ b/drivers/regulator/devres.c
@@ -171,8 +171,9 @@ int devm_regulator_bulk_get(struct device *dev, int num_consumers,
 								NORMAL_GET);
 		if (IS_ERR(consumers[i].consumer)) {
 			ret = PTR_ERR(consumers[i].consumer);
-			dev_err(dev, "Failed to get supply '%s': %d\n",
-				consumers[i].supply, ret);
+			if (ret != -EPROBE_DEFER)
+				dev_err(dev, "Failed to get supply '%s': %d\n",
+					consumers[i].supply, ret);
 			consumers[i].consumer = NULL;
 			goto err;
 		}
-- 
2.5.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-16 11:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15 20:35 [PATCH] regulator: Don't print error in devm_regulator_bulk_get() on -EPROBE_DEFER Javier Martinez Canillas
2016-03-16  9:59 ` Mark Brown
2016-03-16 11:19   ` Javier Martinez Canillas
2016-03-16 11:37     ` Mark Brown
2016-03-16 11:40       ` Javier Martinez Canillas

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®