]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerMark Brown <broonie@kernel.org>
Wed, 15 Dec 2021 14:02:52 +0000 (14:02 +0000)
commit0ef6310ae01d5dce541252a2cd0b1eeb5312c72d
tree1a140bde1408979b20d327331dca8e2ddb36d657
parentad48df8878dec1b9d8c6170457f232a4d976cc25
ASoC: rt5663: Handle device_property_read_u32_array error codes

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: 8b8f51ca85ed ("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>
sound/soc/codecs/rt5663.c