Commit 4edf738d authored by Sameer Pujar's avatar Sameer Pujar Committed by Mark Brown

ASoC: tegra: Fix MBDRC bypass mode check

MBDRC supports different modes of operation. There is no configuration
required for bypass mode. The hw_params() call does not filter bypass
mode correctly and it leads to following Smatch static checker warning:

  sound/soc/tegra/tegra210_mbdrc.c:778 tegra210_mbdrc_hw_params()
  warn: bitwise AND condition is false here

Fix this condition by using proper mode mask and just return for bypass
mode.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: 7358a803 ("ASoC: tegra: Add Tegra210 based OPE driver")
Signed-off-by: default avatarSameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1655267914-24702-1-git-send-email-spujar@nvidia.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5983a8a4
......@@ -775,7 +775,9 @@ int tegra210_mbdrc_hw_params(struct snd_soc_component *cmpnt)
regmap_read(ope->mbdrc_regmap, TEGRA210_MBDRC_CFG, &val);
if (val & TEGRA210_MBDRC_CFG_MBDRC_MODE_BYPASS)
val &= TEGRA210_MBDRC_CFG_MBDRC_MODE_MASK;
if (val == TEGRA210_MBDRC_CFG_MBDRC_MODE_BYPASS)
return 0;
for (i = 0; i < MBDRC_NUM_BAND; i++) {
......
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