aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Boyd <[email protected]>2023-06-12 18:12:00 -0700
committerStephen Boyd <[email protected]>2023-06-13 12:00:55 -0700
commit3e253b21693d08126c828cddcb4fd3949898f773 (patch)
treef5ca502c1da67607b8979cee39bb236b78f1fc1d
parentbe8fa5fd0a48fd2decc4de81ffe72bb3ceacecd9 (diff)
ASoC: tlv320aic32x4: pll: Remove impossible condition in clk_aic32x4_pll_determine_rate()
Smatch warns: sound/soc/codecs/tlv320aic32x4-clk.c:219 clk_aic32x4_pll_determine_rate() warn: unsigned 'rate' is never less than zero. Cc: Maxime Ripard <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 25d43ec352ea ("ASoC: tlv320aic32x4: pll: Switch to determine_rate") Signed-off-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Maxime Ripard <[email protected]>
-rw-r--r--sound/soc/codecs/tlv320aic32x4-clk.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4-clk.c b/sound/soc/codecs/tlv320aic32x4-clk.c
index a7ec501b4c69..c116e82f712d 100644
--- a/sound/soc/codecs/tlv320aic32x4-clk.c
+++ b/sound/soc/codecs/tlv320aic32x4-clk.c
@@ -208,18 +208,14 @@ static int clk_aic32x4_pll_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
struct clk_aic32x4_pll_muldiv settings;
- unsigned long rate;
int ret;
ret = clk_aic32x4_pll_calc_muldiv(&settings, req->rate, req->best_parent_rate);
if (ret < 0)
return -EINVAL;
- rate = clk_aic32x4_pll_calc_rate(&settings, req->best_parent_rate);
- if (rate < 0)
- return rate;
+ req->rate = clk_aic32x4_pll_calc_rate(&settings, req->best_parent_rate);
- req->rate = rate;
return 0;
}