From: Heiko Stuebner Date: Thu, 15 Oct 2015 12:35:01 +0000 (+0200) Subject: soc: rockchip: power-domain: don't try to print the clock name in error case X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c3ce5b3768b17120dca852513af211c4acd3d2b0;p=linux-beck.git 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 Reviewed-by: Caesar Wang --- 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, if (IS_ERR(clk)) { error = PTR_ERR(clk); dev_err(pmu->dev, - "%s: failed to get clk %pC (index %d): %d\n", - node->name, clk, i, error); + "%s: failed to get clk at index %d: %d\n", + node->name, i, error); goto err_out; }