]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: timer: Remove kernel warning at compat ioctl error paths
authorTakashi Iwai <tiwai@suse.de>
Tue, 21 Nov 2017 15:36:11 +0000 (16:36 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 21 Nov 2017 15:36:11 +0000 (16:36 +0100)
commit4b7a7df01f4fe34af4e65cac3b66e41e38457cd6
tree4b6761206e11463c08ec2fe50e734f62fcd910fe
parent1d582d0ba0d49afcec235c4c90231876d17dc89f
ALSA: timer: Remove kernel warning at compat ioctl error paths

Some timer compat ioctls have NULL checks of timer instance with
snd_BUG_ON() that bring up WARN_ON() when the debug option is set.
Actually the condition can be met in the normal situation and it's
confusing and bad to spew kernel warnings with stack trace there.
Let's remove snd_BUG_ON() invocation and replace with the simple
checks.  Also, correct the error code to EBADFD to follow the native
ioctl error handling.

Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/timer_compat.c