Skip to contentSkip to conversation

regulator: core: Quiet -EPROBE_DEFER from regulator_bulk_get()

PATCH In review Douglas Anderson 2 participants 2 messages May 14, 2018 – May 17, 2018 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: core: Quiet -EPROBE_DEFER from regulator_bulk_get()

The -EPROBE_DEFER virus demands special case code to avoid printing error messages when the error is only -EPROBE_DEFER. Spread the virus to a new host: regulator_bulk_get()

---

 drivers/regulator/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/regulator/core.c +3 -2
index d4803460a557..42e97fb85e95 100644
@@ -3696,8 +3696,9 @@ int regulator_bulk_get(struct device *dev, int num_consumers,
 						      consumers[i].supply);
 		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;
 		}
Signature · 1 line
2.17.0.441.gb46fe60e1d-goog
maintainer
#1 lore raw
Quoted 3 lines · Douglas Anderson

The -EPROBE_DEFER virus demands special case code to avoid printing error messages when the error is only -EPROBE_DEFER. Spread the virus to a new host: regulator_bulk_get()

There's no requirement to suppress probe deferral messages and doing so makes it harder to debug problems since things just fail silently. It's better to work on making the core smarter about probe ordering, for example by building out the device dependency infrastructure so that it can be used to avoid trying to probe things when we know there are unsatisfied dependencies.