Skip to content

Commit

Permalink
clk: meson: clk-pll: make "ret" a signed integer
Browse files Browse the repository at this point in the history
[ Upstream commit 9e71728 ]

The error codes returned by meson_clk_get_pll_settings() are all
negative. Make "ret" a signed integer in meson_clk_pll_set_rate() to
make it match with the clk_ops.set_rate API as well as the data type
returned by meson_clk_get_pll_settings().

Fixes: 8eed1db ("clk: meson: pll: update driver for the g12a")
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-3-martin.blumenstingl@googlemail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
xdarklight authored and gregkh committed Mar 4, 2021
1 parent 55e4765 commit 02df541
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/clk/meson/clk-pll.c
Expand Up @@ -365,8 +365,9 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate,
{
struct clk_regmap *clk = to_clk_regmap(hw);
struct meson_clk_pll_data *pll = meson_clk_pll_data(clk);
unsigned int enabled, m, n, frac = 0, ret;
unsigned int enabled, m, n, frac = 0;
unsigned long old_rate;
int ret;

if (parent_rate == 0 || rate == 0)
return -EINVAL;
Expand Down

0 comments on commit 02df541

Please sign in to comment.