]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/core/oss/pcm_oss.c
ALSA: Avoid endless sleep after disconnect
[karo-tx-linux.git] / sound / core / oss / pcm_oss.c
index 2529e01538e932165fc0b9ad9bd9042a1b6657fa..f337b66a020b5bbbfbf15c6730c2ec0143bfd11b 100644 (file)
@@ -2441,6 +2441,10 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
                mutex_unlock(&pcm->open_mutex);
                schedule();
                mutex_lock(&pcm->open_mutex);
+               if (pcm->card->shutdown) {
+                       err = -ENODEV;
+                       break;
+               }
                if (signal_pending(current)) {
                        err = -ERESTARTSYS;
                        break;