All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] opp: Don't print error message if getting optional regulator fails
@ 2022-03-06 21:46 Heiner Kallweit
  2022-03-07  5:27 ` Viresh Kumar
  0 siblings, 1 reply; 4+ messages in thread
From: Heiner Kallweit @ 2022-03-06 21:46 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd; +Cc: Linux PM

The regulators are optional, therefore I see no need to bother users
with an error level message if -ENODEV is returned.

Inspiration was the following error on my system:
lima d00c0000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/opp/core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 740407252..8af5979cc 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2020,7 +2020,10 @@ struct opp_table *dev_pm_opp_set_regulators(struct device *dev,
 		reg = regulator_get_optional(dev, names[i]);
 		if (IS_ERR(reg)) {
 			ret = PTR_ERR(reg);
-			if (ret != -EPROBE_DEFER)
+			if (ret == -ENODEV)
+				dev_info(dev, "%s: no regulator (%s) found\n",
+					 __func__, names[i]);
+			else if (ret != -EPROBE_DEFER)
 				dev_err(dev, "%s: no regulator (%s) found: %d\n",
 					__func__, names[i], ret);
 			goto free_regulators;
-- 
2.35.1


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

end of thread, other threads:[~2022-03-08  4:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-06 21:46 [PATCH] opp: Don't print error message if getting optional regulator fails Heiner Kallweit
2022-03-07  5:27 ` Viresh Kumar
2022-03-07 17:18   ` Heiner Kallweit
2022-03-08  4:33     ` Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.