linux_dsm_epyc7002/sound/soc/mediatek/mt8173
Pi-Hsun Shih ed1666f686
ASoC: mediatek: Fix UBSAN warning.
In sound/soc/mediatek/common/mtk-afe-fe-dai.c, when xxx_reg is -1, it's
a no-op to call mtk_regmap_update_bits, but since both xxx_reg and
xxx_shift are set to -1, the (1 << xxx_shift) in the argument would
trigger a UBSAN warning.

Fix the warning by setting those xxx_shift to 0 instead.

Note that since the code explicitly checks .mono_shift >= 0 and
.fs_shift >= 0 before using them in '<<' operator, those two members are
not set to 0.

Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-19 12:51:13 +00:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mt8173-afe-common.h ASoC: mediatek: switch to SPDX license tag 2018-04-26 15:09:36 +01:00
mt8173-afe-pcm.c ASoC: mediatek: Fix UBSAN warning. 2019-03-19 12:51:13 +00:00
mt8173-max98090.c ASoC: add for_each_card_prelinks() macro 2018-09-20 10:18:34 -07:00
mt8173-rt5650-rt5514.c ASoC: add for_each_card_prelinks() macro 2018-09-20 10:18:34 -07:00
mt8173-rt5650-rt5676.c ASoC: add for_each_card_prelinks() macro 2018-09-20 10:18:34 -07:00
mt8173-rt5650.c ASoC: add for_each_card_prelinks() macro 2018-09-20 10:18:34 -07:00