]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: hda: Add error check for snd_ctl_rename_id() in snd_hda_create_dig_out_ctls()
authorWentao Liang <vulab@iscas.ac.cn>
Thu, 13 Feb 2025 07:45:43 +0000 (15:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2025 12:34:20 +0000 (04:34 -0800)
commit718068fcea578fef5e72bb0de28b294d59b3df73
tree1c675ceeb866afe57be4c7aa3555314ebe678f55
parenta32b46045455ebc12ef3793bf2b9ff2c7f89defe
ALSA: hda: Add error check for snd_ctl_rename_id() in snd_hda_create_dig_out_ctls()

commit 822b7ec657e99b44b874e052d8540d8b54fe8569 upstream.

Check the return value of snd_ctl_rename_id() in
snd_hda_create_dig_out_ctls(). Ensure that failures
are properly handled.

[ Note: the error cannot happen practically because the only error
  condition in snd_ctl_rename_id() is the missing ID, but this is a
  rename, hence it must be present.  But for the code consistency,
  it's safer to have always the proper return check -- tiwai ]

Fixes: 5c219a340850 ("ALSA: hda: Fix kctl->id initialization")
Cc: stable@vger.kernel.org # 6.4+
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20250213074543.1620-1-vulab@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_codec.c