OpenCloudOS-Kernel/sound/soc/mediatek/mt6797
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: mt6797: add Hostless DAI 2018-05-31 11:25:08 +01:00
mt6797-afe-clk.c ASoC: mt6797: switch to SPDX license tag 2018-04-27 11:52:32 +01:00
mt6797-afe-clk.h ASoC: mt6797: switch to SPDX license tag 2018-04-27 11:52:32 +01:00
mt6797-afe-common.h ASoC: mt6797: sub dai use list_head 2018-06-29 13:31:53 +01:00
mt6797-afe-pcm.c ASoC: mediatek: Fix UBSAN warning. 2019-03-19 12:51:13 +00:00
mt6797-dai-adda.c ASoC: mt6797: sub dai use list_head 2018-06-29 13:31:53 +01:00
mt6797-dai-hostless.c ASoC: mt6797: sub dai use list_head 2018-06-29 13:31:53 +01:00
mt6797-dai-pcm.c ASoC: mt6797: sub dai use list_head 2018-06-29 13:31:53 +01:00
mt6797-interconnection.h ASoC: mt6797: switch to SPDX license tag 2018-04-27 11:52:32 +01:00
mt6797-mt6351.c ASoC: tidyup for_each_card_prelinks() dai_link 2018-09-21 09:21:03 -07:00
mt6797-reg.h ASoC: mt6797: add PCM interface 2018-05-31 11:25:04 +01:00