From de1b8b93a0ba016b07d13086a15ad692536e6995 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 8 Nov 2006 15:41:29 +0100 Subject: [ALSA] Fix hang-up at disconnection of usb-audio Fix hang-up at disconnection of usb-audio devices while accessing PCM. Don't handle PCM operations any more after shutdown flag is set. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/core/oss/pcm_oss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/core/oss') diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 505b23ec405..e0821eb3d85 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -2359,7 +2359,8 @@ static int snd_pcm_oss_release(struct inode *inode, struct file *file) substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; snd_assert(substream != NULL, return -ENXIO); pcm = substream->pcm; - snd_pcm_oss_sync(pcm_oss_file); + if (!pcm->card->shutdown) + snd_pcm_oss_sync(pcm_oss_file); mutex_lock(&pcm->open_mutex); snd_pcm_oss_release_file(pcm_oss_file); mutex_unlock(&pcm->open_mutex); -- cgit v1.2.3