diff options
author | Paul Cercueil <paul@crapouillou.net> | 2020-02-13 19:19:52 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2020-03-21 03:08:40 +0300 |
commit | edcc42945dee85e9dec3737f3dbf59d917ae5418 (patch) | |
tree | 062435904793588663dbc8318ade126b5858ee23 /drivers/clk/ingenic/tcu.c | |
parent | c067b46d731a764fc46ecc466c2967088c97089e (diff) | |
download | linux-edcc42945dee85e9dec3737f3dbf59d917ae5418.tar.xz |
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: 4f89e4b8f121 ("clk: ingenic: Add driver for the TCU clocks")
Cc: stable@vger.kernel.org
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lkml.kernel.org/r/20200213161952.37460-2-paul@crapouillou.net
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/ingenic/tcu.c')
-rw-r--r-- | drivers/clk/ingenic/tcu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c index 879990762f57..153a954b0d2f 100644 --- a/drivers/clk/ingenic/tcu.c +++ b/drivers/clk/ingenic/tcu.c @@ -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); |