]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: stm32: sai: fix less than zero comparison on unsigned int
authorColin Ian King <colin.king@canonical.com>
Wed, 31 Oct 2018 19:31:43 +0000 (19:31 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 5 Nov 2018 10:33:06 +0000 (10:33 +0000)
commit574ed9633486b6bffb73a0913ce1c21778401511
tree82176386781378ef69a7755bb6d32a35e2184fd1
parentf630c74755763954e46ada22cb887770a3c4fdd4
ASoC: stm32: sai: fix less than zero comparison on unsigned int

Currently, the comparison of div < 0 is always false because div is
an unsigned int. Fix this by making div an int.

Detected by CoverityScan, CID#1475309 ("Unsigned compared against 0")

Fixes: d9f6aeb2d2c6 "(ASoC: stm32: sai: set sai as mclk clock provider")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/stm/stm32_sai_sub.c