[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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux