[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1473977679-18649-3-git-send-email-heiko@sntech.de>
Date: Fri, 16 Sep 2016 00:14:39 +0200
From: Heiko Stuebner <heiko@...ech.de>
To: linux-rockchip@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org, tomeu.vizoso@...labora.com,
wxt@...k-chips.com, rjw@...ysocki.net,
Heiko Stuebner <heiko@...ech.de>
Subject: [PATCH 2/2] soc: rockchip: power-domain: Handle errors from of_genpd_add_provider_onecell
From: Tomeu Vizoso <tomeu.vizoso@...labora.com>
It was a bit surprising that the device was reported to have probed just
fine, but the provider hadn't been registered.
So handle any errors when registering the provider and fail the probe
accordingly.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
Cc: Caesar Wang <wxt@...k-chips.com>
Signed-off-by: Heiko Stuebner <heiko@...ech.de>
---
unchanged from Tomeu's single-patch
drivers/soc/rockchip/pm_domains.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 241df213..2fd0c89 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -636,7 +636,11 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
goto err_out;
}
- of_genpd_add_provider_onecell(np, &pmu->genpd_data);
+ error = of_genpd_add_provider_onecell(np, &pmu->genpd_data);
+ if (error) {
+ dev_err(dev, "failed to add provider: %d\n", error);
+ goto err_out;
+ }
return 0;
--
2.8.1
Powered by blists - more mailing lists