Commit a56a5698 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Mark Brown

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: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: default avatarAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent bb0c35fc
...@@ -801,7 +801,7 @@ static int da7219_dai_event(struct snd_soc_dapm_widget *w, ...@@ -801,7 +801,7 @@ static int da7219_dai_event(struct snd_soc_dapm_widget *w,
++i; ++i;
msleep(50); msleep(50);
} }
} while ((i < DA7219_SRM_CHECK_RETRIES) & (!srm_lock)); } while ((i < DA7219_SRM_CHECK_RETRIES) && (!srm_lock));
if (!srm_lock) if (!srm_lock)
dev_warn(codec->dev, "SRM failed to lock\n"); dev_warn(codec->dev, "SRM failed to lock\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment