aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/maestro3.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/maestro3.c')
-rw-r--r--sound/pci/maestro3.c10
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);