]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
soc: rockchip: power-domain: don't try to print the clock name in error case
authorHeiko Stuebner <heiko@sntech.de>
Thu, 15 Oct 2015 12:35:01 +0000 (14:35 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Fri, 16 Oct 2015 07:23:59 +0000 (09:23 +0200)
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>
drivers/soc/rockchip/pm_domains.c

index 8268d5d2b85202999c93490cdc683b56e05e10fd..534c58937a566205b85e216bf1e230c9186a637f 100644 (file)
@@ -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;
                }