ASoC: rt5663: Handle device_property_read_u32_array error codes
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 15 Dec 2021 03:15:50 +0000 (11:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:12 +0000 (11:04 +0100)
commite91edc3b443c398a2ba3d5b5d7fb0728b9ae3ac4
treefc91a608cd0c3510b04709fb6794acd84efe8cac
parent45f4e3c7587782e30d61c3769b35634ea05f8a71
ASoC: rt5663: Handle device_property_read_u32_array error codes

[ Upstream commit 2167c0b205960607fb136b4bb3c556a62be1569a ]

The return value of device_property_read_u32_array() is not always 0.
To catch the exception in case that devm_kzalloc failed and the
rt5663->imp_table was NULL, which caused the failure of
device_property_read_u32_array.

Fixes: 450f0f6a8fb4 ("ASoC: rt5663: Add the manual offset field to compensate the DC offset")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20211215031550.70702-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/rt5663.c