summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-12 12:57:08 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-14 14:34:23 -0200
commit229295f1d6713bc8c8ba900ba62bca03e34bba52 (patch)
tree6103e6cc81c1d015f946a6fbda6844435597ace2 /drivers/media
parente847022a8e1d732da96ddbd8d4170500f4c3f8b1 (diff)
downloadblackbird-op-linux-229295f1d6713bc8c8ba900ba62bca03e34bba52.tar.gz
blackbird-op-linux-229295f1d6713bc8c8ba900ba62bca03e34bba52.zip
[media] em28xx-audio: fix return code on device disconnect
Alsa has an special non-negative return code to indicate device removal at snd_em28xx_capture_pointer(). Use it, instead of an error code. Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Tested-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/em28xx/em28xx-audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
index f3e320098f79..47766b796acb 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -434,7 +434,7 @@ static snd_pcm_uframes_t snd_em28xx_capture_pointer(struct snd_pcm_substream
dev = snd_pcm_substream_chip(substream);
if (dev->disconnected)
- return -ENODEV;
+ return SNDRV_PCM_POS_XRUN;
spin_lock_irqsave(&dev->adev.slock, flags);
hwptr_done = dev->adev.hwptr_done_capture;
OpenPOWER on IntegriCloud