summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-01-10 23:48:05 +0100
committerBen Hutchings <ben@decadent.org.uk>2018-03-03 15:52:21 +0000
commit1901ad4e0b5b43492c2eedf89bf0d946902fc641 (patch)
tree8ef2592e4c8cd59651caf6d48b653d6f745a3acf /sound
parentf0e95a371a18d47e047ad496760383078d20738b (diff)
downloadlinux-stable-1901ad4e0b5b43492c2eedf89bf0d946902fc641.tar.gz
linux-stable-1901ad4e0b5b43492c2eedf89bf0d946902fc641.tar.bz2
linux-stable-1901ad4e0b5b43492c2eedf89bf0d946902fc641.zip
ALSA: pcm: Remove yet superfluous WARN_ON()
commit 23b19b7b50fe1867da8d431eea9cd3e4b6328c2c upstream. muldiv32() contains a snd_BUG_ON() (which is morphed as WARN_ON() with debug option) for checking the case of 0 / 0. This would be helpful if this happens only as a logical error; however, since the hw refine is performed with any data set provided by user, the inconsistent values that can trigger such a condition might be passed easily. Actually, syzbot caught this by passing some zero'ed old hw_params ioctl. So, having snd_BUG_ON() there is simply superfluous and rather harmful to give unnecessary confusions. Let's get rid of it. Reported-by: syzbot+7e6ee55011deeebce15d@syzkaller.appspotmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_lib.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 3a2b844bc861..e6dbc14a27e1 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -644,7 +644,6 @@ static inline unsigned int muldiv32(unsigned int a, unsigned int b,
{
u_int64_t n = (u_int64_t) a * b;
if (c == 0) {
- snd_BUG_ON(!n);
*r = 0;
return UINT_MAX;
}