soc: rockchip: power-domain: don't try to print the clock name in error case

A patch from »soc: rockchip: power-domain: don't try to print the clock name in error case« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Thu, 15 Oct 2015 14:35:01 +0200

Commit-Message

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@...>

Patch-Comment

drivers/soc/rockchip/pm_domains.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Statistics

  • 2 lines added
  • 2 lines removed

Changes

---------------------- drivers/soc/rockchip/pm_domains.c -----------------------
index 8268d5d..534c589 100644
@@ -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;
}
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...