6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shawn Lin [ Upstream commit 4c0d69d677cf5b0065ebbb3ceb8ba66fddbec630 ] rockchip_pm_add_subdomain() ignored the return value of its recursive call, so a failure deeper in the hierarchy was silently dropped and probe still succeeded with an incomplete domain tree. Fixes: 6be05b5ec161 ("soc: rockchip: power-domain: add support for sub-power domains") Signed-off-by: Shawn Lin Reviewed-by: Sebastian Reichel Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson [ sashal: goto err_out instead of return, so the np reference taken by for_each_child_of_node() is dropped ] Signed-off-by: Sasha Levin --- drivers/soc/rockchip/pm_domains.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c index 1146fdf477aa8..2697977cf24c3 100644 --- a/drivers/soc/rockchip/pm_domains.c +++ b/drivers/soc/rockchip/pm_domains.c @@ -767,7 +767,9 @@ static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu, parent_domain->name, child_domain->name); } - rockchip_pm_add_subdomain(pmu, np); + error = rockchip_pm_add_subdomain(pmu, np); + if (error) + goto err_out; } return 0; -- 2.53.0