Skip to content

Commit 2812815

Browse files
tiwaigregkh
authored andcommitted
ALSA: hda: tas2781: Fix wrong reference of tasdevice_priv
commit 3f4422e upstream. During the conversion to unify the calibration data management, the reference to tasdevice_priv was wrongly set to h->hda_priv instead of h->priv. This resulted in memory corruption and crashes eventually. Unfortunately it's a void pointer, hence the compiler couldn't know that it's wrong. Fixes: 4fe2385 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib") Link: https://bugzilla.suse.com/show_bug.cgi?id=1248270 Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20250820051902.4523-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d70ca21 commit 2812815

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
287287
efi_char16_t efi_name[TAS2563_CAL_VAR_NAME_MAX];
288288
unsigned long max_size = TAS2563_CAL_DATA_SIZE;
289289
unsigned char var8[TAS2563_CAL_VAR_NAME_MAX];
290-
struct tasdevice_priv *p = h->hda_priv;
290+
struct tasdevice_priv *p = h->priv;
291291
struct calidata *cd = &p->cali_data;
292292
struct cali_reg *r = &cd->cali_reg_array;
293293
unsigned int offset = 0;

0 commit comments

Comments
 (0)