Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: mips/ad1843: Use WARN_ON() instead of BUG_ON()

BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+1 -1
+1 -1
sound/mips/ad1843.c
··· 276 276 if (reg == -1) 277 277 reg = fp->reg; 278 278 else 279 - BUG_ON(reg != fp->reg); 279 + WARN_ON(reg != fp->reg); 280 280 m = ((1 << fp->nbits) - 1) << fp->lo_bit; 281 281 mask |= m; 282 282 bits |= (value << fp->lo_bit) & m;