summaryrefslogtreecommitdiffstats
path: root/drivers/soc/rockchip
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-09-16 00:14:39 +0200
committerHeiko Stuebner <heiko@sntech.de>2016-11-11 02:14:59 +0100
commitdabc0259db63338f0e64107cc92b2241f98a3284 (patch)
tree39362af325784a222afac6386a6553739af19f96 /drivers/soc/rockchip
parent79d12b7a7f227ed51dd86b16a7536b391e46f7b0 (diff)
downloadblackbird-op-linux-dabc0259db63338f0e64107cc92b2241f98a3284.tar.gz
blackbird-op-linux-dabc0259db63338f0e64107cc92b2241f98a3284.zip
soc: rockchip: power-domain: Handle errors from of_genpd_add_provider_onecell
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@collabora.com> Cc: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/soc/rockchip')
-rw-r--r--drivers/soc/rockchip/pm_domains.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index d36a7351af9d..1c78c42416c6 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -672,7 +672,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;
OpenPOWER on IntegriCloud