[alsa-devel] [asoc:for-4.20 519/526] sound/soc/stm/stm32_sai_sub.c:343 stm32_sai_mclk_set_rate() warn: unsigned 'div' is never less than zero.
kbuild test robot
lkp at intel.com
Tue Oct 23 00:29:32 CEST 2018
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-4.20
head: 7f91e2af1a4a2c34fc2e8fb046c722e1a9c85399
commit: 8307b2afd386ccce369821daa2196068c47fe8cd [519/526] ASoC: stm32: sai: set sai as mclk clock provider
smatch warnings:
sound/soc/stm/stm32_sai_sub.c:343 stm32_sai_mclk_set_rate() warn: unsigned 'div' is never less than zero.
vim +/div +343 sound/soc/stm/stm32_sai_sub.c
333
334 static int stm32_sai_mclk_set_rate(struct clk_hw *hw, unsigned long rate,
335 unsigned long parent_rate)
336 {
337 struct stm32_sai_mclk_data *mclk = to_mclk_data(hw);
338 struct stm32_sai_sub_data *sai = mclk->sai_data;
339 unsigned int div;
340 int ret;
341
342 div = stm32_sai_get_clk_div(sai, parent_rate, rate);
> 343 if (div < 0)
344 return div;
345
346 ret = stm32_sai_set_clk_div(sai, div);
347 if (ret)
348 return ret;
349
350 mclk->freq = rate;
351
352 return 0;
353 }
354
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
More information about the Alsa-devel
mailing list