diff options
author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2023-02-27 11:59:31 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-03-06 21:30:01 +0100 |
commit | 1bd8e27fd0db0fe7f489213836dcbab92934f8fa (patch) | |
tree | 461050c4120de3b0a4ba6129d48fa376ac7deb1b /drivers/clk/at91/clk-sam9x60-pll.c | |
parent | clk: visconti: remove unused visconti_pll_provider::regmap (diff) | |
download | linux-1bd8e27fd0db0fe7f489213836dcbab92934f8fa.tar.xz linux-1bd8e27fd0db0fe7f489213836dcbab92934f8fa.zip |
clk: at91: clk-sam9x60-pll: fix return value check
sam9x60_frac_pll_compute_mul_frac() can't return zero. Remove the check
against zero to reflect this.
Fixes: 43b1bb4a9b3e ("clk: at91: clk-sam9x60-pll: re-factor to support plls with multiple outputs")
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20230227105931.2812412-1-claudiu.beznea@microchip.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/at91/clk-sam9x60-pll.c')
-rw-r--r-- | drivers/clk/at91/clk-sam9x60-pll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/at91/clk-sam9x60-pll.c b/drivers/clk/at91/clk-sam9x60-pll.c index d757003004cb..0882ed01d5c2 100644 --- a/drivers/clk/at91/clk-sam9x60-pll.c +++ b/drivers/clk/at91/clk-sam9x60-pll.c @@ -668,7 +668,7 @@ sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock, ret = sam9x60_frac_pll_compute_mul_frac(&frac->core, FCORE_MIN, parent_rate, true); - if (ret <= 0) { + if (ret < 0) { hw = ERR_PTR(ret); goto free; } |