]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: ctl: fix error path at adding user-defined element set
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 13 Nov 2020 09:20:43 +0000 (18:20 +0900)
committerTakashi Iwai <tiwai@suse.de>
Fri, 13 Nov 2020 10:33:55 +0000 (11:33 +0100)
commit770c4fa90c379467103fe4e26ef0fdf3139208e9
tree2819ff882517ceac965948d7a5af44ff746f1f2d
parent8f14267da3261f5b93cdbb80563057146411237e
ALSA: ctl: fix error path at adding user-defined element set

When processing request to add/replace user-defined element set, check
of given element identifier and decision of numeric identifier is done
in "__snd_ctl_add_replace()" helper function. When the result of check
is wrong, the helper function returns error code. The error code shall
be returned to userspace application.

Current implementation includes bug to return zero to userspace application
regardless of the result. This commit fixes the bug.

Cc: <stable@vger.kernel.org>
Fixes: f3e63895344f ("ALSA: control: Fix race between adding and removing a user element")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20201113092043.16148-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/control.c