Skip to contentSkip to conversation

regulator: core: move warning message below EPROBE_DEFER

PATCH In review Christian Eggers 2 participants 2 messages Mar 13, 2025 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: core: move warning message below EPROBE_DEFER

Avoid getting extra "supply XXX not found, using dummy regulator" messages at startup (in case that the dummy regulator has not fully been probed at this time).

---
 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/core.c +1 -1
index 4276493ce7c6..4d0f13899e6b 100644
@@ -2219,10 +2219,10 @@ struct regulator *_regulator_get_common(struct regulator_dev *rdev, struct devic
 			 * enabled, even if it isn't hooked up, and just
 			 * provide a dummy.
 			 */
-			dev_warn(dev, "supply %s not found, using dummy regulator\n", id);
 			rdev = dummy_regulator_rdev;
 			if (!rdev)
 				return ERR_PTR(-EPROBE_DEFER);
+			dev_warn(dev, "supply %s not found, using dummy regulator\n", id);
 			get_device(&rdev->dev);
 			break;
 
Signature · 1 line
2.44.1
maintainer
#1 lore raw
Quoted 3 lines · Christian Eggers

Avoid getting extra "supply XXX not found, using dummy regulator" messages at startup (in case that the dummy regulator has not fully been probed at this time).

Thanks, I had actually unwound the commit and have your new version in CI now since it was tip of tree and I wanted to get this into -next.