Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: Show correct information when fail to set clock rate

This patch shows the correct information for debugging when fail
to set clock rate because original error message shows the error
value instead of current clock rate.

Cc: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Chanwoo Choi and committed by
Stephen Boyd
2885c3b2 64a12c56

+3 -2
+3 -2
drivers/clk/clk-conf.c
··· 106 106 107 107 rc = clk_set_rate(clk, rate); 108 108 if (rc < 0) 109 - pr_err("clk: couldn't set %s clock rate: %d\n", 110 - __clk_get_name(clk), rc); 109 + pr_err("clk: couldn't set %s clk rate to %d (%d), current rate: %ld\n", 110 + __clk_get_name(clk), rate, rc, 111 + clk_get_rate(clk)); 111 112 clk_put(clk); 112 113 } 113 114 index++;