Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a65e5694 authored by Vikram Mulukutla's avatar Vikram Mulukutla
Browse files

qcom: clock-alpha-pll: Correct types to account for error values



Using an unsigned 32 bit integer to contain error
values is invalid, since error checking macros
such as IS_ERR_VALUE may promote these variables
to 64 bits before comparing with the error values.

Change-Id: I67834897fc7a664e5ca68cb8a61a3172a6e36853
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 1d3124ad
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -265,7 +265,8 @@ static int alpha_pll_set_rate(struct clk *c, unsigned long rate)
	struct alpha_pll_clk *pll = to_alpha_pll_clk(c);
	struct alpha_pll_masks *masks = pll->masks;
	unsigned long flags, freq_hz;
	u32 regval, l_val, vco_val;
	u32 regval, l_val;
	int vco_val;
	u64 a_val;

	freq_hz = round_rate_up(pll, rate, &l_val, &a_val);
@@ -316,7 +317,8 @@ static long alpha_pll_round_rate(struct clk *c, unsigned long rate)
{
	struct alpha_pll_clk *pll = to_alpha_pll_clk(c);
	struct alpha_pll_vco_tbl *v = pll->vco_tbl;
	u32 ret, l_val;
	int ret;
	u32 l_val;
	unsigned long freq_hz;
	u64 a_val;
	int i;