]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: da7219: fix inappropriate condition statement
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 26 Sep 2016 22:45:07 +0000 (07:45 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 27 Sep 2016 16:49:13 +0000 (09:49 -0700)
commit9dfeb40afdb39bb9d14b66b26fb0e506a1ba9b19
tree35e9302a24accf3ba1f87cfa588f41f0c583c9bf
parent85faa9536fcd69f285ee6ef2ad865c8f925c31b8
ASoC: da7219: fix inappropriate condition statement

Sparse reports a below warning.

sound/soc/codecs/da7219.c:804:57: warning: dubious: x & !y

The line includes a condition statement; '(a < b) & !c'. Practically, the
evaluated value of this statement equals to the value of '(a < b) && !c'.
Although, it's not an usual way to use bitwise operations as logical
operations to several conditions.

This commit fixes the bug.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/da7219.c