Skip to content

Commit 3e253b2

Browse files
committed
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: 25d43ec ("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]>
1 parent be8fa5f commit 3e253b2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

sound/soc/codecs/tlv320aic32x4-clk.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,14 @@ static int clk_aic32x4_pll_determine_rate(struct clk_hw *hw,
208208
struct clk_rate_request *req)
209209
{
210210
struct clk_aic32x4_pll_muldiv settings;
211-
unsigned long rate;
212211
int ret;
213212

214213
ret = clk_aic32x4_pll_calc_muldiv(&settings, req->rate, req->best_parent_rate);
215214
if (ret < 0)
216215
return -EINVAL;
217216

218-
rate = clk_aic32x4_pll_calc_rate(&settings, req->best_parent_rate);
219-
if (rate < 0)
220-
return rate;
217+
req->rate = clk_aic32x4_pll_calc_rate(&settings, req->best_parent_rate);
221218

222-
req->rate = rate;
223219
return 0;
224220
}
225221

0 commit comments

Comments
 (0)