diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-08 11:12:14 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-13 05:46:38 -0400 |
commit | da3cec35dd3c31d8706db4bf379372ce70d92118 (patch) | |
tree | 9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/maestro3.c | |
parent | 622207dc31895b4e82c39100db8635d885c795e2 (diff) |
ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, either removed or replaced with
if () with snd_BUG_ON().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/maestro3.c')
-rw-r--r-- | sound/pci/maestro3.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 0037be74fdea..9ff3f9e34404 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c | |||
@@ -1175,7 +1175,8 @@ snd_m3_pcm_trigger(struct snd_pcm_substream *subs, int cmd) | |||
1175 | struct m3_dma *s = subs->runtime->private_data; | 1175 | struct m3_dma *s = subs->runtime->private_data; |
1176 | int err = -EINVAL; | 1176 | int err = -EINVAL; |
1177 | 1177 | ||
1178 | snd_assert(s != NULL, return -ENXIO); | 1178 | if (snd_BUG_ON(!s)) |
1179 | return -ENXIO; | ||
1179 | 1180 | ||
1180 | spin_lock(&chip->reg_lock); | 1181 | spin_lock(&chip->reg_lock); |
1181 | switch (cmd) { | 1182 | switch (cmd) { |
@@ -1487,7 +1488,8 @@ snd_m3_pcm_prepare(struct snd_pcm_substream *subs) | |||
1487 | struct snd_pcm_runtime *runtime = subs->runtime; | 1488 | struct snd_pcm_runtime *runtime = subs->runtime; |
1488 | struct m3_dma *s = runtime->private_data; | 1489 | struct m3_dma *s = runtime->private_data; |
1489 | 1490 | ||
1490 | snd_assert(s != NULL, return -ENXIO); | 1491 | if (snd_BUG_ON(!s)) |
1492 | return -ENXIO; | ||
1491 | 1493 | ||
1492 | if (runtime->format != SNDRV_PCM_FORMAT_U8 && | 1494 | if (runtime->format != SNDRV_PCM_FORMAT_U8 && |
1493 | runtime->format != SNDRV_PCM_FORMAT_S16_LE) | 1495 | runtime->format != SNDRV_PCM_FORMAT_S16_LE) |
@@ -1546,7 +1548,9 @@ snd_m3_pcm_pointer(struct snd_pcm_substream *subs) | |||
1546 | struct snd_m3 *chip = snd_pcm_substream_chip(subs); | 1548 | struct snd_m3 *chip = snd_pcm_substream_chip(subs); |
1547 | unsigned int ptr; | 1549 | unsigned int ptr; |
1548 | struct m3_dma *s = subs->runtime->private_data; | 1550 | struct m3_dma *s = subs->runtime->private_data; |
1549 | snd_assert(s != NULL, return 0); | 1551 | |
1552 | if (snd_BUG_ON(!s)) | ||
1553 | return 0; | ||
1550 | 1554 | ||
1551 | spin_lock(&chip->reg_lock); | 1555 | spin_lock(&chip->reg_lock); |
1552 | ptr = snd_m3_get_pointer(chip, s, subs); | 1556 | ptr = snd_m3_get_pointer(chip, s, subs); |