diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/sparc/cs4231.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index b47f6fe6277f..dbb1b625eb2f 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -907,19 +907,24 @@ static int snd_cs4231_playback_prepare(struct snd_pcm_substream *substream) | |||
907 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); | 907 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
908 | struct snd_pcm_runtime *runtime = substream->runtime; | 908 | struct snd_pcm_runtime *runtime = substream->runtime; |
909 | unsigned long flags; | 909 | unsigned long flags; |
910 | int ret = 0; | ||
910 | 911 | ||
911 | spin_lock_irqsave(&chip->lock, flags); | 912 | spin_lock_irqsave(&chip->lock, flags); |
912 | 913 | ||
913 | chip->image[CS4231_IFACE_CTRL] &= ~(CS4231_PLAYBACK_ENABLE | | 914 | chip->image[CS4231_IFACE_CTRL] &= ~(CS4231_PLAYBACK_ENABLE | |
914 | CS4231_PLAYBACK_PIO); | 915 | CS4231_PLAYBACK_PIO); |
915 | 916 | ||
916 | if (WARN_ON(runtime->period_size > 0xffff + 1)) | 917 | if (WARN_ON(runtime->period_size > 0xffff + 1)) { |
917 | return -EINVAL; | 918 | ret = -EINVAL; |
919 | goto out; | ||
920 | } | ||
918 | 921 | ||
919 | chip->p_periods_sent = 0; | 922 | chip->p_periods_sent = 0; |
923 | |||
924 | out: | ||
920 | spin_unlock_irqrestore(&chip->lock, flags); | 925 | spin_unlock_irqrestore(&chip->lock, flags); |
921 | 926 | ||
922 | return 0; | 927 | return ret; |
923 | } | 928 | } |
924 | 929 | ||
925 | static int snd_cs4231_capture_hw_params(struct snd_pcm_substream *substream, | 930 | static int snd_cs4231_capture_hw_params(struct snd_pcm_substream *substream, |