ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check
authorTakashi Iwai <tiwai@suse.de>
Tue, 1 Sep 2020 13:18:02 +0000 (15:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:03:11 +0000 (19:03 +0200)
commite463aed86fcec8135b31112a1729b1c03d785a07
tree60799c868feeea88b7e87d07ab5d7f431a10c308
parente8e9ec81957f61d458b5de0b324a18e0311cc7e2
ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check

commit 949a1ebe8cea7b342085cb6a4946b498306b9493 upstream.

The PCM OSS mulaw plugin has a check of the format of the counter part
whether it's a linear format.  The check is with snd_BUG_ON() that
emits WARN_ON() when the debug config is set, and it confuses
syzkaller as if it were a serious issue.  Let's drop snd_BUG_ON() for
avoiding that.

While we're at it, correct the error code to a more suitable, EINVAL.

Reported-by: syzbot+23b22dc2e0b81cbfcc95@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200901131802.18157-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/oss/mulaw.c