Skip to content

Commit 05b2363

Browse files
jhovoldandersson
authored andcommitted
clk: qcom: clk-alpha-pll: fix lucid 5lpe pll enabled check
The lucid 5lpe PLL enable check only checks for an impossible negative return value and does not actually return as intended in case the PLL is already enabled (e.g. has been left enabled by boot firmware). Fixes: f4c7e27 ("clk: qcom: clk-alpha-pll: Add support for Lucid 5LPE PLL") Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent f9b493d commit 05b2363

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/clk/qcom/clk-alpha-pll.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,9 +1903,8 @@ static int alpha_pll_lucid_5lpe_enable(struct clk_hw *hw)
19031903
}
19041904

19051905
/* Check if PLL is already enabled, return if enabled */
1906-
ret = trion_pll_is_enabled(pll, pll->clkr.regmap);
1907-
if (ret < 0)
1908-
return ret;
1906+
if (trion_pll_is_enabled(pll, pll->clkr.regmap))
1907+
return 0;
19091908

19101909
ret = regmap_update_bits(pll->clkr.regmap, PLL_MODE(pll), PLL_RESET_N, PLL_RESET_N);
19111910
if (ret)

0 commit comments

Comments
 (0)