linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: renesas: rcar-gen3: Fix error return code in cpg_sd_clock_recalc_rate
@ 2017-04-19 17:46 Yoshihiro Kaneko
  2017-07-14 14:25 ` Wolfram Sang
  0 siblings, 1 reply; 8+ messages in thread
From: Yoshihiro Kaneko @ 2017-04-19 17:46 UTC (permalink / raw)
  To: linux-clk
  Cc: Michael Turquette, Stephen Boyd, Geert Uytterhoeven, Simon Horman,
	Magnus Damm, linux-renesas-soc

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

In .recalc_rate of struct clk_ops, it is desirable to return 0 if an
error occurs, but -EINVAL is returned. This patch fixes it.

Fixes: 5b1defde7054 ("clk: renesas: cpg-mssr: Extract common R-Car Gen3 support code")
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---
This patch is based on the clk-next branch of linux-clk tree.

 drivers/clk/renesas/rcar-gen3-cpg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index 4ab76b1..48c6e98 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -287,7 +287,7 @@ static unsigned long cpg_sd_clock_recalc_rate(struct clk_hw *hw,
 			break;
 
 	if (i >= clock->div_num)
-		return -EINVAL;
+		return 0;
 
 	return DIV_ROUND_CLOSEST(rate, clock->div_table[i].div);
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-18  1:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-19 17:46 [PATCH] clk: renesas: rcar-gen3: Fix error return code in cpg_sd_clock_recalc_rate Yoshihiro Kaneko
2017-07-14 14:25 ` Wolfram Sang
2017-07-17  8:00   ` Geert Uytterhoeven
2017-07-17  9:18     ` Wolfram Sang
2017-07-17 10:18       ` Geert Uytterhoeven
2017-07-17 10:25         ` Wolfram Sang
2017-07-17 10:29         ` Wolfram Sang
2017-07-18  1:21         ` Stephen Boyd

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