Skip to content

Commit

Permalink
ALSA: asihpi: Kill BUG_ON() usages
Browse files Browse the repository at this point in the history
BUG_ON() is the worst choice for a trivial sanity check.
Either it should be removed or replaced with a softer one like
WARN_ON() if still really needed.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Sep 7, 2017
1 parent c844558 commit 2a0d85d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sound/pci/asihpi/asihpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,10 @@ static void snd_card_asihpi_pcm_int_start(struct snd_pcm_substream *substream)
struct snd_card_asihpi_pcm *dpcm;
struct snd_card_asihpi *card;

BUG_ON(!substream);

dpcm = (struct snd_card_asihpi_pcm *)substream->runtime->private_data;
card = snd_pcm_substream_chip(substream);

BUG_ON(in_interrupt());
WARN_ON(in_interrupt());
tasklet_disable(&card->t);
card->llmode_streampriv = dpcm;
tasklet_enable(&card->t);
Expand All @@ -578,8 +576,6 @@ static void snd_card_asihpi_pcm_int_stop(struct snd_pcm_substream *substream)
struct snd_card_asihpi_pcm *dpcm;
struct snd_card_asihpi *card;

BUG_ON(!substream);

dpcm = (struct snd_card_asihpi_pcm *)substream->runtime->private_data;
card = snd_pcm_substream_chip(substream);

Expand Down

0 comments on commit 2a0d85d

Please sign in to comment.