Skip to content

Commit c60b953

Browse files
Akhilesh Patilbebarino
authored andcommitted
clk: spacemit: ccu_pll: fix error return value in recalc_rate callback
Return 0 instead of -EINVAL if function ccu_pll_recalc_rate() fails to get correct rate entry. Follow .recalc_rate callback documentation as mentioned in include/linux/clk-provider.h for error return value. Signed-off-by: Akhilesh Patil <[email protected]> Fixes: 1b72c59 ("clk: spacemit: Add clock support for SpacemiT K1 SoC") Reviewed-by: Haylen Chu <[email protected]> Reviewed-by: Alex Elder <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 297a5fe commit c60b953

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/spacemit/ccu_pll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static unsigned long ccu_pll_recalc_rate(struct clk_hw *hw,
122122

123123
WARN_ON_ONCE(!entry);
124124

125-
return entry ? entry->rate : -EINVAL;
125+
return entry ? entry->rate : 0;
126126
}
127127

128128
static long ccu_pll_round_rate(struct clk_hw *hw, unsigned long rate,

0 commit comments

Comments
 (0)