aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/atiixp_modem.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-12 12:35:23 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-12 12:37:32 +0200
commit365d46dc9be9b3c833990a06f3994b1987eda578 (patch)
tree9397d1304144a288411f2118707f44ff5e862fa6 /sound/pci/atiixp_modem.c
parent5dc64a3442b98eaa0e3730c35fcf00cf962a93e7 (diff)
parentfd048088306656824958e7783ffcee27e241b361 (diff)
Merge branch 'linus' into x86/xen
Conflicts: arch/x86/kernel/cpu/common.c arch/x86/kernel/process_64.c arch/x86/xen/enlighten.c
Diffstat (limited to 'sound/pci/atiixp_modem.c')
-rw-r--r--sound/pci/atiixp_modem.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index d457a32a793..2f106306c7f 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -674,7 +674,9 @@ static int snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
struct atiixp_dma *dma = substream->runtime->private_data;
int err = 0;
- snd_assert(dma->ops->enable_transfer && dma->ops->flush_dma, return -EINVAL);
+ if (snd_BUG_ON(!dma->ops->enable_transfer ||
+ !dma->ops->flush_dma))
+ return -EINVAL;
spin_lock(&chip->reg_lock);
switch(cmd) {
@@ -865,7 +867,8 @@ static int snd_atiixp_pcm_open(struct snd_pcm_substream *substream,
.mask = 0,
};
- snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL);
+ if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma))
+ return -EINVAL;
if (dma->opened)
return -EBUSY;
@@ -895,7 +898,8 @@ static int snd_atiixp_pcm_close(struct snd_pcm_substream *substream,
{
struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
/* disable DMA bits */
- snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL);
+ if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma))
+ return -EINVAL;
spin_lock_irq(&chip->reg_lock);
dma->ops->enable_dma(chip, 0);
spin_unlock_irq(&chip->reg_lock);