* [PATCH] soc: rockchip: power-domain: don't try to print the clock name in error case
@ 2015-10-15 13:22 Heiko Stübner
2015-10-16 1:19 ` Caesar Wang
2015-10-16 8:17 ` Heiko Stübner
0 siblings, 2 replies; 3+ messages in thread
From: Heiko Stübner @ 2015-10-15 13:22 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
drivers/soc/rockchip/pm_domains.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 8268d5d..534c589 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;
}
--
2.6.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] soc: rockchip: power-domain: don't try to print the clock name in error case
2015-10-15 13:22 [PATCH] soc: rockchip: power-domain: don't try to print the clock name in error case Heiko Stübner
@ 2015-10-16 1:19 ` Caesar Wang
2015-10-16 8:17 ` Heiko Stübner
1 sibling, 0 replies; 3+ messages in thread
From: Caesar Wang @ 2015-10-16 1:19 UTC (permalink / raw)
To: linux-arm-kernel
Heiko,
Thanks to fix it.
? 2015?10?15? 21:22, Heiko St?bner ??:
> 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>
Look good to me, you can free add that.
Reviewed-by: Caesar Wang <wxt@rock-chips.com>
> ---
> drivers/soc/rockchip/pm_domains.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
> index 8268d5d..534c589 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;
> }
>
>
> --
> Thanks,
> Caesar
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH] soc: rockchip: power-domain: don't try to print the clock name in error case
2015-10-15 13:22 [PATCH] soc: rockchip: power-domain: don't try to print the clock name in error case Heiko Stübner
2015-10-16 1:19 ` Caesar Wang
@ 2015-10-16 8:17 ` Heiko Stübner
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stübner @ 2015-10-16 8:17 UTC (permalink / raw)
To: linux-arm-kernel
Am Donnerstag, 15. Oktober 2015, 15:22:30 schrieb Heiko St?bner:
> 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>
applied to my drivers branch with Caesar's Reviewed-tag.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-16 8:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 13:22 [PATCH] soc: rockchip: power-domain: don't try to print the clock name in error case Heiko Stübner
2015-10-16 1:19 ` Caesar Wang
2015-10-16 8:17 ` Heiko Stübner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).