ALSA: hda/tas2781: Fix a potential race condition that causes a NULL pointer in case...
authorShenghao Ding <shenghao-ding@ti.com>
Thu, 11 Sep 2025 07:11:31 +0000 (15:11 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 11 Sep 2025 16:11:17 +0000 (18:11 +0200)
commitb0035df56dcd210d735e90ecd16817693f1a2ed9
tree6a01f50fb1651599a9e96e41bff23af988271fc7
parent71d2893a235bf3b95baccead27b3d47f2f2cdc4c
ALSA: hda/tas2781: Fix a potential race condition that causes a NULL pointer in case no efi.get_variable exsits

A a potential race condition reported by one of my customers that leads to
a NULL pointer dereference, where the call to efi.get_variable should be
guarded with efi_rt_services_supported() to ensure that function exists.

Fixes: 4fe238513407 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/codecs/side-codecs/tas2781_hda.c
sound/hda/codecs/side-codecs/tas2781_hda_i2c.c