summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-09-07 10:51:54 +0200
committerTakashi Iwai <tiwai@suse.de>2017-09-07 10:52:37 +0200
commit2a0d85d9add77bb7a4ddd61557ffb21ca5370d15 (patch)
tree9463c4614125cb06cbf4c9e439afd5ed28f245a1
parentc8445589450582a3d948779c0fc5106604ce89a1 (diff)
ALSA: asihpi: Kill BUG_ON() usages
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 <tiwai@suse.de>
-rw-r--r--sound/pci/asihpi/asihpi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index 976a3d23557e..70d023a85bf5 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -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);
@@ -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);