]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:04:22 +0000 (09:04 +0100)
commit0ec943aafc3b72e8f5a7b057fe59c7e7d0c7ff55
tree578a583fc50654bb16a000f8f68937b8fabe3f9f
parentf252502b536360d4f70145f030383011ebf8d176
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