mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 21:44:06 +08:00
[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>
This commit is contained in:
parent
e847022a8e
commit
229295f1d6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user