ASoC: mediatek: mtk-btcvsd: Add checks for write and read of mtk_btcvsd_snd
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 16 Nov 2022 03:07:50 +0000 (11:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:18 +0000 (13:32 +0100)
commitdeed9567aae02078912e610f404f740c91a006dd
tree3c83d587e70da78d10276661667649fb3820bba2
parent9d997d67e501ba5986a7a473705333f56b83dd1b
ASoC: mediatek: mtk-btcvsd: Add checks for write and read of mtk_btcvsd_snd

[ Upstream commit d067b3378a78c9c3048ac535e31c171b6f5b5846 ]

As the mtk_btcvsd_snd_write and mtk_btcvsd_snd_read may return error,
it should be better to catch the exception.

Fixes: 4bd8597dc36c ("ASoC: mediatek: add btcvsd driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20221116030750.40500-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/mediatek/common/mtk-btcvsd.c