[PATCH] driver: probe: report power domain attach failure

Ahmad Fatoum a.fatoum at pengutronix.de
Sat Jul 30 02:49:55 PDT 2022


Power domains are attached before driver probe and non-existence of
power domain driver leads to permanent probe deferral without any
pointer as to why. Add a status message to make debugging easier.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/base/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 2fb73917b43c..c0ea2746b388 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -17,7 +17,7 @@ static int platform_probe(struct device_d *dev)
 
 	ret = genpd_dev_pm_attach(dev);
 	if (ret < 0)
-		return ret;
+		return dev_err_probe(dev, ret, "power domain attach failed\n");
 
 	return dev->driver->probe(dev);
 }
-- 
2.30.2




More information about the barebox mailing list