Thread (5 messages) 5 messages, 5 authors, 2016-12-01

[PATCH] PM / Domains: Do not print PM domain add error message if EPROBE_DEFER

STALE3591d

From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: 2016-11-30 12:24:58
Also in: linux-renesas-soc
Subsystem: driver core, kobjects, debugfs and sysfs, hibernation (aka software suspend, aka swsusp), power management core, suspend to ram, the rest · Maintainers: Greg Kroah-Hartman, "Rafael J. Wysocki", Danilo Krummrich, Linus Torvalds

EPROBE_DEFER is not an error, hence printing an error message like

    renesas_irqc e61c0000.interrupt-controller: failed to add to PM domain always-on: -517

may confuse the user.

Suppress the error message in case of EPROBE_DEFER to fix this.

Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/base/power/domain.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 64164aac6ae3990a..f22137b52dcb641b 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2032,8 +2032,9 @@ int genpd_dev_pm_attach(struct device *dev)
 	mutex_unlock(&gpd_list_lock);
 
 	if (ret < 0) {
-		dev_err(dev, "failed to add to PM domain %s: %d",
-			pd->name, ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(dev, "failed to add to PM domain %s: %d",
+				pd->name, ret);
 		goto out;
 	}
 
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help