Skip to content

Commit

Permalink
ALSA: mips/ad1843: Use WARN_ON() instead of BUG_ON()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tiwai committed Nov 6, 2013
1 parent 5a19b17 commit c3cd1ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/mips/ad1843.c
Expand Up @@ -276,7 +276,7 @@ static void ad1843_write_multi(struct snd_ad1843 *ad1843, int argcount, ...)
if (reg == -1)
reg = fp->reg;
else
BUG_ON(reg != fp->reg);
WARN_ON(reg != fp->reg);
m = ((1 << fp->nbits) - 1) << fp->lo_bit;
mask |= m;
bits |= (value << fp->lo_bit) & m;
Expand Down

0 comments on commit c3cd1ba

Please sign in to comment.