diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2016-09-16 00:14:39 +0200 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2016-11-11 02:14:59 +0100 |
commit | dabc0259db63338f0e64107cc92b2241f98a3284 (patch) | |
tree | 39362af325784a222afac6386a6553739af19f96 /drivers/soc/rockchip | |
parent | soc: rockchip: power-domain: use pm_genpd_remove in error cleanup (diff) | |
download | linux-dabc0259db63338f0e64107cc92b2241f98a3284.tar.xz 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.c | 6 |
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; |