linux/sound/pci/ac97
Maciej S. Szmigiero 52d256cc71 ALSA: ac97: Use snd_ctl_rename() to rename a control
With the recent addition of hashed controls lookup it's not enough to just
update the control name field, the hash entries for the modified control
have to be updated too.

snd_ctl_rename() takes care of that, so use it instead of directly
modifying the control name.

While we are at it, check also that the new control name doesn't
accidentally overwrite the available buffer space.

Fixes: c27e1efb61 ("ALSA: control: Use xarray for faster lookups")
Cc: stable@vger.kernel.org
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Link: https://lore.kernel.org/r/adb68bfa0885ba4a2583794b828f8e20d23f67c7.1666296963.git.maciej.szmigiero@oracle.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-21 08:17:11 +02:00
..
ac97_codec.c ALSA: ac97: Use snd_ctl_rename() to rename a control 2022-10-21 08:17:11 +02:00
ac97_id.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ac97_local.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ac97_patch.c ALSA: ac97: Fix assignment in if condition 2021-06-09 17:30:02 +02:00
ac97_patch.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ac97_pcm.c ALSA: Fix some typo 2021-12-06 10:04:05 +01:00
ac97_proc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00