aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Osipenko <[email protected]>2021-01-21 00:12:31 +0300
committerRafael J. Wysocki <[email protected]>2021-01-22 17:12:59 +0100
commit18027d6f392ee8d89d9df4dff0a7db4fb2d6f8a5 (patch)
tree1fb623295dcf514ed5b322913b3766602f2ac790
parent079c42a0ed73500f1d11b5564e31d56c52bee21e (diff)
PM: domains: Make of_genpd_add_subdomain() return -EPROBE_DEFER
Driver of a power domain provider may not be ready at the time of of_genpd_add_subdomain() invocation. Make this function to return -EPROBE_DEFER instead of -ENOENT in order to remove a need from power domain drivers to handle the error code specially. Tested-by: Peter Geis <[email protected]> Tested-by: Nicolas Chauvet <[email protected]> Tested-by: Matt Merhar <[email protected]> [tested on NVIDIA Tegra20/30/124 SoCs] Suggested-by: Ulf Hansson <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Reviewed-by: Viresh Kumar <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
-rw-r--r--drivers/base/power/domain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 4878c824e66c..c615abf56c52 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2496,7 +2496,7 @@ int of_genpd_add_subdomain(struct of_phandle_args *parent_spec,
out:
mutex_unlock(&gpd_list_lock);
- return ret;
+ return ret == -ENOENT ? -EPROBE_DEFER : ret;
}
EXPORT_SYMBOL_GPL(of_genpd_add_subdomain);