aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ad1889.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-10-11 15:39:35 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-11 15:39:35 -0400
commit56c5d900dbb8e042bfad035d18433476931d8f93 (patch)
tree00b793965beeef10db03e0ff021d2d965c410759 /sound/pci/ad1889.c
parent4dd95b63ae25c5cad6986829b5e8788e9faa0330 (diff)
parentead9d23d803ea3a73766c3cb27bf7563ac8d7266 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: sound/core/memalloc.c
Diffstat (limited to 'sound/pci/ad1889.c')
-rw-r--r--sound/pci/ad1889.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index 39ec55b57b1e..92f3a976ef2e 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -549,7 +549,8 @@ snd_ad1889_playback_pointer(struct snd_pcm_substream *ss)
549 ptr = ad1889_readl(chip, AD_DMA_WAVCA); 549 ptr = ad1889_readl(chip, AD_DMA_WAVCA);
550 ptr -= chip->wave.addr; 550 ptr -= chip->wave.addr;
551 551
552 snd_assert((ptr >= 0) && (ptr < chip->wave.size), return 0); 552 if (snd_BUG_ON(ptr >= chip->wave.size))
553 return 0;
553 554
554 return bytes_to_frames(ss->runtime, ptr); 555 return bytes_to_frames(ss->runtime, ptr);
555} 556}
@@ -567,7 +568,8 @@ snd_ad1889_capture_pointer(struct snd_pcm_substream *ss)
567 ptr = ad1889_readl(chip, AD_DMA_ADCCA); 568 ptr = ad1889_readl(chip, AD_DMA_ADCCA);
568 ptr -= chip->ramc.addr; 569 ptr -= chip->ramc.addr;
569 570
570 snd_assert((ptr >= 0) && (ptr < chip->ramc.size), return 0); 571 if (snd_BUG_ON(ptr >= chip->ramc.size))
572 return 0;
571 573
572 return bytes_to_frames(ss->runtime, ptr); 574 return bytes_to_frames(ss->runtime, ptr);
573} 575}