Skip to content

Commit ccdc1f0

Browse files
xdarklightjbrun3t
authored andcommitted
clk: meson: clk-pll: propagate the error from meson_clk_pll_set_rate()
Popagate the error code from meson_clk_pll_set_rate() when the PLL does not lock with the new settings. Fixes: 722825d ("clk: meson: migrate plls clocks to clk_regmap") Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20201226121556.975418-4-martin.blumenstingl@googlemail.com
1 parent 9e71728 commit ccdc1f0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/clk/meson/clk-pll.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate,
394394
if (!enabled)
395395
return 0;
396396

397-
if (meson_clk_pll_enable(hw)) {
397+
ret = meson_clk_pll_enable(hw);
398+
if (ret) {
398399
pr_warn("%s: pll did not lock, trying to restore old rate %lu\n",
399400
__func__, old_rate);
400401
/*
@@ -406,7 +407,7 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate,
406407
meson_clk_pll_set_rate(hw, old_rate, parent_rate);
407408
}
408409

409-
return 0;
410+
return ret;
410411
}
411412

412413
/*

0 commit comments

Comments
 (0)