diff options
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r-- | sound/pci/via82xx.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 6781be9e3078..84ea35d8b252 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -824,7 +824,8 @@ static snd_pcm_uframes_t snd_via686_pcm_pointer(struct snd_pcm_substream *substr | |||
824 | struct viadev *viadev = substream->runtime->private_data; | 824 | struct viadev *viadev = substream->runtime->private_data; |
825 | unsigned int idx, ptr, count, res; | 825 | unsigned int idx, ptr, count, res; |
826 | 826 | ||
827 | snd_assert(viadev->tbl_entries, return 0); | 827 | if (snd_BUG_ON(!viadev->tbl_entries)) |
828 | return 0; | ||
828 | if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE)) | 829 | if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE)) |
829 | return 0; | 830 | return 0; |
830 | 831 | ||
@@ -855,7 +856,8 @@ static snd_pcm_uframes_t snd_via8233_pcm_pointer(struct snd_pcm_substream *subst | |||
855 | unsigned int idx, count, res; | 856 | unsigned int idx, count, res; |
856 | int status; | 857 | int status; |
857 | 858 | ||
858 | snd_assert(viadev->tbl_entries, return 0); | 859 | if (snd_BUG_ON(!viadev->tbl_entries)) |
860 | return 0; | ||
859 | 861 | ||
860 | spin_lock(&chip->reg_lock); | 862 | spin_lock(&chip->reg_lock); |
861 | count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT)); | 863 | count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT)); |
@@ -1037,7 +1039,7 @@ static int snd_via8233_playback_prepare(struct snd_pcm_substream *substream) | |||
1037 | else | 1039 | else |
1038 | rbits = (0x100000 / 48000) * runtime->rate + | 1040 | rbits = (0x100000 / 48000) * runtime->rate + |
1039 | ((0x100000 % 48000) * runtime->rate) / 48000; | 1041 | ((0x100000 % 48000) * runtime->rate) / 48000; |
1040 | snd_assert((rbits & ~0xfffff) == 0, return -EINVAL); | 1042 | snd_BUG_ON(rbits & ~0xfffff); |
1041 | snd_via82xx_channel_reset(chip, viadev); | 1043 | snd_via82xx_channel_reset(chip, viadev); |
1042 | snd_via82xx_set_table_ptr(chip, viadev); | 1044 | snd_via82xx_set_table_ptr(chip, viadev); |
1043 | outb(chip->playback_volume[viadev->reg_offset / 0x10][0], | 1045 | outb(chip->playback_volume[viadev->reg_offset / 0x10][0], |