From: Heiko Stuebner <heiko@sntech.de>
To: linux-rockchip@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, tomeu.vizoso@collabora.com,
wxt@rock-chips.com, rjw@rjwysocki.net,
Heiko Stuebner <heiko@sntech.de>
Subject: [PATCH 2/2] soc: rockchip: power-domain: Handle errors from of_genpd_add_provider_onecell
Date: Fri, 16 Sep 2016 00:14:39 +0200 [thread overview]
Message-ID: <1473977679-18649-3-git-send-email-heiko@sntech.de> (raw)
In-Reply-To: <1473977679-18649-1-git-send-email-heiko@sntech.de>
From: Tomeu Vizoso <tomeu.vizoso@collabora.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@collabora.com>
Cc: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.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
next prev parent reply other threads:[~2016-09-15 22:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-15 22:14 [PATCH 0/2] soc: rockchip: fix probe error path in power-domain driver Heiko Stuebner
2016-09-15 22:14 ` [PATCH 1/2] soc: rockchip: power-domain: use pm_genpd_remove in error cleanup Heiko Stuebner
2016-09-15 22:14 ` Heiko Stuebner [this message]
2016-11-01 22:50 ` [PATCH 0/2] soc: rockchip: fix probe error path in power-domain driver Heiko Stuebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473977679-18649-3-git-send-email-heiko@sntech.de \
--to=heiko@sntech.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=rjw@rjwysocki.net \
--cc=tomeu.vizoso@collabora.com \
--cc=wxt@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox