summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2020-12-26 13:15:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 10:26:26 +0100
commitb070f3b6ee5a944f3d68f9c6d2e043c45c803eb6 (patch)
treedd3986c55a7a2b52e42a86fbfc8d25de988881c5 /drivers/clk
parentf8c601cb3ab4952cd8df339acd3b9a71125f6e0f (diff)
downloadlinux-b070f3b6ee5a944f3d68f9c6d2e043c45c803eb6.tar.gz
linux-b070f3b6ee5a944f3d68f9c6d2e043c45c803eb6.tar.bz2
linux-b070f3b6ee5a944f3d68f9c6d2e043c45c803eb6.zip
clk: meson: clk-pll: propagate the error from meson_clk_pll_set_rate()
[ Upstream commit ccdc1f0836f8e37b558a424f1e491f929b2e7ede ] Popagate the error code from meson_clk_pll_set_rate() when the PLL does not lock with the new settings. Fixes: 722825dcd54b2e ("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/meson/clk-pll.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c
index a92f44fa5a24..e8df254f8085 100644
--- a/drivers/clk/meson/clk-pll.c
+++ b/drivers/clk/meson/clk-pll.c
@@ -392,7 +392,8 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate,
if (!enabled)
return 0;
- if (meson_clk_pll_enable(hw)) {
+ ret = meson_clk_pll_enable(hw);
+ if (ret) {
pr_warn("%s: pll did not lock, trying to restore old rate %lu\n",
__func__, old_rate);
/*
@@ -404,7 +405,7 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate,
meson_clk_pll_set_rate(hw, old_rate, parent_rate);
}
- return 0;
+ return ret;
}
/*