]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ASoC: max98373: Add checks for devm_kcalloc
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 16 Nov 2022 08:25:08 +0000 (16:25 +0800)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 13:00:26 +0000 (14:00 +0100)
commit6c023ef07611dae23577c082bcd30d50b9b276c4
tree5936b5f17dd1f573b543c7d88642c15c8d35d4d1
parentc9c4b311ba925ea718b1a52ae0e7144c12ae2740
ASoC: max98373: Add checks for devm_kcalloc

[ Upstream commit 60591bbf6d5eb44f275eb733943b7757325c1b60 ]

As the devm_kcalloc may return NULL pointer,
it should be better to check the return value
in order to avoid NULL poineter dereference.

Fixes: 349dd23931d1 ("ASoC: max98373: don't access volatile registers in bias level off")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20221116082508.17418-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit bd419c7c68bd316c33a0205c54539236c33044fa)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
sound/soc/codecs/max98373-i2c.c