diff options
author | Heiko Stuebner <heiko@sntech.de> | 2015-10-15 08:35:01 -0400 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2015-10-16 03:23:59 -0400 |
commit | c3ce5b3768b17120dca852513af211c4acd3d2b0 (patch) | |
tree | 17ff308e08ca05659314449a9884f90c5e9378e9 | |
parent | 0cc598915fc787193ddb7401a11f80c17ccbabe4 (diff) |
soc: rockchip: power-domain: don't try to print the clock name in error case
When we never got the the clock-reference, i.e. when IS_ERR(clk) is true,
don't try to print the clock name via %pC as this of course produces a
null-pointer-dereference in __clk_get_name().
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Caesar Wang <wxt@rock-chips.com>
-rw-r--r-- | drivers/soc/rockchip/pm_domains.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c index 8268d5d2b852..534c58937a56 100644 --- a/drivers/soc/rockchip/pm_domains.c +++ b/drivers/soc/rockchip/pm_domains.c | |||
@@ -265,8 +265,8 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu, | |||
265 | if (IS_ERR(clk)) { | 265 | if (IS_ERR(clk)) { |
266 | error = PTR_ERR(clk); | 266 | error = PTR_ERR(clk); |
267 | dev_err(pmu->dev, | 267 | dev_err(pmu->dev, |
268 | "%s: failed to get clk %pC (index %d): %d\n", | 268 | "%s: failed to get clk at index %d: %d\n", |
269 | node->name, clk, i, error); | 269 | node->name, i, error); |
270 | goto err_out; | 270 | goto err_out; |
271 | } | 271 | } |
272 | 272 | ||