From: Takashi Sakamoto Date: Mon, 26 Sep 2016 22:45:07 +0000 (+0900) Subject: ASoC: da7219: fix inappropriate condition statement X-Git-Tag: v5.15~12637^2~4^2~8^3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a56a569818ea831ed2325dc5d1122dc0b8a229d0;p=platform%2Fkernel%2Flinux-starfive.git 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 Acked-by: Adam Thomson Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 65f7e98..3200762 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -801,7 +801,7 @@ static int da7219_dai_event(struct snd_soc_dapm_widget *w, ++i; msleep(50); } - } while ((i < DA7219_SRM_CHECK_RETRIES) & (!srm_lock)); + } while ((i < DA7219_SRM_CHECK_RETRIES) && (!srm_lock)); if (!srm_lock) dev_warn(codec->dev, "SRM failed to lock\n");