diff options
-rw-r--r-- | drivers/media/video/em28xx/em28xx-audio.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c index 94378ccb7505..4df6d3288424 100644 --- a/drivers/media/video/em28xx/em28xx-audio.c +++ b/drivers/media/video/em28xx/em28xx-audio.c | |||
@@ -65,6 +65,9 @@ static int em28xx_isoc_audio_deinit(struct em28xx *dev) | |||
65 | usb_unlink_urb(dev->adev.urb[i]); | 65 | usb_unlink_urb(dev->adev.urb[i]); |
66 | usb_free_urb(dev->adev.urb[i]); | 66 | usb_free_urb(dev->adev.urb[i]); |
67 | dev->adev.urb[i] = NULL; | 67 | dev->adev.urb[i] = NULL; |
68 | |||
69 | kfree(dev->adev.transfer_buffer[i]); | ||
70 | dev->adev.transfer_buffer[i] = NULL; | ||
68 | } | 71 | } |
69 | 72 | ||
70 | return 0; | 73 | return 0; |
@@ -389,11 +392,15 @@ static int snd_em28xx_capture_trigger(struct snd_pcm_substream *substream, | |||
389 | static snd_pcm_uframes_t snd_em28xx_capture_pointer(struct snd_pcm_substream | 392 | static snd_pcm_uframes_t snd_em28xx_capture_pointer(struct snd_pcm_substream |
390 | *substream) | 393 | *substream) |
391 | { | 394 | { |
392 | struct em28xx *dev; | 395 | unsigned long flags; |
393 | 396 | ||
397 | struct em28xx *dev; | ||
394 | snd_pcm_uframes_t hwptr_done; | 398 | snd_pcm_uframes_t hwptr_done; |
399 | |||
395 | dev = snd_pcm_substream_chip(substream); | 400 | dev = snd_pcm_substream_chip(substream); |
401 | spin_lock_irqsave(&dev->adev.slock, flags); | ||
396 | hwptr_done = dev->adev.hwptr_done_capture; | 402 | hwptr_done = dev->adev.hwptr_done_capture; |
403 | spin_unlock_irqrestore(&dev->adev.slock, flags); | ||
397 | 404 | ||
398 | return hwptr_done; | 405 | return hwptr_done; |
399 | } | 406 | } |