Skip to content

Commit edcc429

Browse files
pcercueibebarino
authored andcommitted
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: 4f89e4b ("clk: ingenic: Add driver for the TCU clocks") Cc: [email protected] Signed-off-by: Paul Cercueil <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent c067b46 commit edcc429

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/ingenic/tcu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static long ingenic_tcu_round_rate(struct clk_hw *hw, unsigned long req_rate,
189189
u8 prescale;
190190

191191
if (req_rate > rate)
192-
return -EINVAL;
192+
return rate;
193193

194194
prescale = ingenic_tcu_get_prescale(rate, req_rate);
195195

0 commit comments

Comments
 (0)