Message ID | 20170713210656.31911-1-wsa+renesas@sang-engineering.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Thu, Jul 13, 2017 at 11:06:56PM +0200, Wolfram Sang wrote: > 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: Wolfram Sang <wsa+renesas@sang-engineering.com> I just saw that Kaneko-san posted this patch as well: https://patchwork.kernel.org/patch/9688509/ Please pick his patch, I'll add my Rev-by there.
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c index 3dee900522b703..e7371a8c4eb701 100644 --- a/drivers/clk/renesas/rcar-gen3-cpg.c +++ b/drivers/clk/renesas/rcar-gen3-cpg.c @@ -147,7 +147,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); }