Unverified Commit c60b9538 authored by Akhilesh Patil's avatar Akhilesh Patil Committed by Stephen Boyd
Browse files

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: default avatarAkhilesh Patil <akhilesh@ee.iitb.ac.in>
Fixes: 1b72c59d ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Reviewed-by: default avatarHaylen Chu <heylenay@4d2.org>
Reviewed-by: default avatarAlex Elder <elder@riscstar.com>
Link: https://lore.kernel.org/r/aIBzVClNQOBrjIFG@bhairav-test.ee.iitb.ac.in


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 297a5fe7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ static unsigned long ccu_pll_recalc_rate(struct clk_hw *hw,

	WARN_ON_ONCE(!entry);

	return entry ? entry->rate : -EINVAL;
	return entry ? entry->rate : 0;
}

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