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 <maxime@cerno.tech>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202306101217.08CRVGcK-lkp@intel.com/
Fixes:
25d43ec352ea ("ASoC: tlv320aic32x4: pll: Switch to determine_rate")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20230613011201.1166753-1-sboyd@kernel.org
Reviewed-by: Maxime Ripard <mripard@kernel.org>
struct clk_rate_request *req)
{
struct clk_aic32x4_pll_muldiv settings;
struct clk_rate_request *req)
{
struct clk_aic32x4_pll_muldiv settings;
int ret;
ret = clk_aic32x4_pll_calc_muldiv(&settings, req->rate, req->best_parent_rate);
if (ret < 0)
return -EINVAL;
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);