]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: cs-amp-lib: Fix NULL pointer crash if efi.get_variable is NULL
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 5 Aug 2024 11:42:22 +0000 (12:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:22 +0000 (15:34 +0200)
commit5b6baaa7cbd77ff980516bad38bbc5a648bb5158
tree2107152a2301f01240fe781eed2696e737f61eb0
parent0fcc4a5b5b485cc09a737a5eb16e19ee6318792b
ASoC: cs-amp-lib: Fix NULL pointer crash if efi.get_variable is NULL

[ Upstream commit dc268085e499666b9f4f0fcb4c5a94e1c0b193b3 ]

Call efi_rt_services_supported() to check that efi.get_variable exists
before calling it.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 1cad8725f2b9 ("ASoC: cs-amp-lib: Add helpers for factory calibration data")
Link: https://patch.msgid.link/20240805114222.15722-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/cs-amp-lib.c