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>
This commit is contained in:
Heiko Stuebner 2015-10-15 14:35:01 +02:00
parent 0cc598915f
commit c3ce5b3768
1 changed files with 2 additions and 2 deletions

View File

@ -265,8 +265,8 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
error = PTR_ERR(clk); error = PTR_ERR(clk);
dev_err(pmu->dev, dev_err(pmu->dev,
"%s: failed to get clk %pC (index %d): %d\n", "%s: failed to get clk at index %d: %d\n",
node->name, clk, i, error); node->name, i, error);
goto err_out; goto err_out;
} }