linux_dsm_epyc7002/sound/soc/mediatek/common
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 ASoC: mediatek: add btcvsd driver 2019-02-02 15:59:27 +00:00
mtk-afe-fe-dai.c ASoC: mediatek: Fix UBSAN warning. 2019-03-19 12:51:13 +00:00
mtk-afe-fe-dai.h ASoC: mediatek: switch to SPDX license tag 2018-04-26 15:09:36 +01:00
mtk-afe-platform-driver.c ASoC: mediatek: Drop superfluous PCM preallocation error checks 2019-02-06 18:29:11 +01:00
mtk-afe-platform-driver.h ASoC: mt6797: combine DAI to register component 2018-05-25 18:34:48 +01:00
mtk-base-afe.h ASoC: mediatek: sub dai use list_head 2018-06-29 13:31:52 +01:00
mtk-btcvsd.c ASoC: mediatek: btcvsd add loopback 2019-02-28 14:18:26 +00:00