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 09:54:07 +0000 (10:54 +0100)
commit0e04518b1dd96d36571d5fafad4190890da9c503
tree043ca583d4393fabfea673734aabb3aeb0123c36
parent7c0d9c815ce87257e2eba1a346c27211e0867b81
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