diff options
| -rw-r--r-- | sound/usb/caiaq/audio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index 2cf87f5afed4..fde9a7a29cb6 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c | |||
| @@ -311,8 +311,10 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub) | |||
| 311 | 311 | ||
| 312 | spin_lock(&dev->spinlock); | 312 | spin_lock(&dev->spinlock); |
| 313 | 313 | ||
| 314 | if (dev->input_panic || dev->output_panic) | 314 | if (dev->input_panic || dev->output_panic) { |
| 315 | ptr = SNDRV_PCM_POS_XRUN; | 315 | ptr = SNDRV_PCM_POS_XRUN; |
| 316 | goto unlock; | ||
| 317 | } | ||
| 316 | 318 | ||
| 317 | if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) | 319 | if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) |
| 318 | ptr = bytes_to_frames(sub->runtime, | 320 | ptr = bytes_to_frames(sub->runtime, |
| @@ -321,6 +323,7 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub) | |||
| 321 | ptr = bytes_to_frames(sub->runtime, | 323 | ptr = bytes_to_frames(sub->runtime, |
| 322 | dev->audio_in_buf_pos[index]); | 324 | dev->audio_in_buf_pos[index]); |
| 323 | 325 | ||
| 326 | unlock: | ||
| 324 | spin_unlock(&dev->spinlock); | 327 | spin_unlock(&dev->spinlock); |
| 325 | return ptr; | 328 | return ptr; |
| 326 | } | 329 | } |
