Skip to content

Commit 23b19b7

Browse files
committed
ALSA: pcm: Remove yet superfluous WARN_ON()
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: [email protected] Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 031f335 commit 23b19b7

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

sound/core/pcm_lib.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,6 @@ static inline unsigned int muldiv32(unsigned int a, unsigned int b,
560560
{
561561
u_int64_t n = (u_int64_t) a * b;
562562
if (c == 0) {
563-
snd_BUG_ON(!n);
564563
*r = 0;
565564
return UINT_MAX;
566565
}

0 commit comments

Comments
 (0)