Commit edcc4294 authored by Paul Cercueil's avatar Paul Cercueil Committed by Stephen Boyd

clk: ingenic/TCU: Fix round_rate returning error

When requesting a rate superior to the parent's rate, it would return
-EINVAL instead of simply returning the parent's rate like it should.

Fixes: 4f89e4b8 ("clk: ingenic: Add driver for the TCU clocks")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Link: https://lkml.kernel.org/r/20200213161952.37460-2-paul@crapouillou.netSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent c067b46d
......@@ -189,7 +189,7 @@ static long ingenic_tcu_round_rate(struct clk_hw *hw, unsigned long req_rate,
u8 prescale;
if (req_rate > rate)
return -EINVAL;
return rate;
prescale = ingenic_tcu_get_prescale(rate, req_rate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment