[PATCH] clk: Show clock rate instead of return value

Chanwoo Choi
2015-04-02T06:40:46Z

This patch shows the current clock rate instead of return value
when clk_set_rate() return fail because log message means the clock rate.

Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/clk/clk-conf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
index aad4796..fb1ee65 100644
--- a/drivers/clk/clk-conf.c
+++ b/drivers/clk/clk-conf.c
@@ -107,8 +107,8 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier)

rc = clk_set_rate(clk, rate);
if (rc < 0)
- pr_err("clk: couldn't set %s clock rate: %d\n",
- __clk_get_name(clk), rc);
+ pr_err("clk: couldn't set %s clock rate: %ld\n",
+ __clk_get_name(clk), clk_get_rate(clk));
clk_put(clk);
}
index++;
--
1.8.5.5