diff options
Diffstat (limited to 'sound/sparc/amd7930.c')
-rw-r--r-- | sound/sparc/amd7930.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index 5af5503edadb..f87933e48812 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c | |||
@@ -766,7 +766,6 @@ static int __devinit snd_amd7930_pcm(struct snd_amd7930 *amd) | |||
766 | /* playback count */ 1, | 766 | /* playback count */ 1, |
767 | /* capture count */ 1, &pcm)) < 0) | 767 | /* capture count */ 1, &pcm)) < 0) |
768 | return err; | 768 | return err; |
769 | snd_assert(pcm != NULL, return -EINVAL); | ||
770 | 769 | ||
771 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_amd7930_playback_ops); | 770 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_amd7930_playback_ops); |
772 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_amd7930_capture_ops); | 771 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_amd7930_capture_ops); |
@@ -789,13 +788,6 @@ static int __devinit snd_amd7930_pcm(struct snd_amd7930 *amd) | |||
789 | 788 | ||
790 | static int snd_amd7930_info_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_info *uinfo) | 789 | static int snd_amd7930_info_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_info *uinfo) |
791 | { | 790 | { |
792 | int type = kctl->private_value; | ||
793 | |||
794 | snd_assert(type == VOLUME_MONITOR || | ||
795 | type == VOLUME_CAPTURE || | ||
796 | type == VOLUME_PLAYBACK, return -EINVAL); | ||
797 | (void) type; | ||
798 | |||
799 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 791 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
800 | uinfo->count = 1; | 792 | uinfo->count = 1; |
801 | uinfo->value.integer.min = 0; | 793 | uinfo->value.integer.min = 0; |
@@ -810,10 +802,6 @@ static int snd_amd7930_get_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem | |||
810 | int type = kctl->private_value; | 802 | int type = kctl->private_value; |
811 | int *swval; | 803 | int *swval; |
812 | 804 | ||
813 | snd_assert(type == VOLUME_MONITOR || | ||
814 | type == VOLUME_CAPTURE || | ||
815 | type == VOLUME_PLAYBACK, return -EINVAL); | ||
816 | |||
817 | switch (type) { | 805 | switch (type) { |
818 | case VOLUME_MONITOR: | 806 | case VOLUME_MONITOR: |
819 | swval = &amd->mgain; | 807 | swval = &amd->mgain; |
@@ -839,10 +827,6 @@ static int snd_amd7930_put_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem | |||
839 | int type = kctl->private_value; | 827 | int type = kctl->private_value; |
840 | int *swval, change; | 828 | int *swval, change; |
841 | 829 | ||
842 | snd_assert(type == VOLUME_MONITOR || | ||
843 | type == VOLUME_CAPTURE || | ||
844 | type == VOLUME_PLAYBACK, return -EINVAL); | ||
845 | |||
846 | switch (type) { | 830 | switch (type) { |
847 | case VOLUME_MONITOR: | 831 | case VOLUME_MONITOR: |
848 | swval = &amd->mgain; | 832 | swval = &amd->mgain; |
@@ -905,7 +889,8 @@ static int __devinit snd_amd7930_mixer(struct snd_amd7930 *amd) | |||
905 | struct snd_card *card; | 889 | struct snd_card *card; |
906 | int idx, err; | 890 | int idx, err; |
907 | 891 | ||
908 | snd_assert(amd != NULL && amd->card != NULL, return -EINVAL); | 892 | if (snd_BUG_ON(!amd || !amd->card)) |
893 | return -EINVAL; | ||
909 | 894 | ||
910 | card = amd->card; | 895 | card = amd->card; |
911 | strcpy(card->mixername, card->shortname); | 896 | strcpy(card->mixername, card->shortname); |