]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - sound/core/control.c
ALSA: Avoid endless sleep after disconnect
[karo-tx-linux.git] / sound / core / control.c
index 9768a3963c8fe5abfc4f3a37af6c4f3a8031323d..8c7c2c9bba61e4dd421eb6a0c797bd0cf17b81ae 100644 (file)
@@ -1437,6 +1437,8 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer,
                        spin_unlock_irq(&ctl->read_lock);
                        schedule();
                        remove_wait_queue(&ctl->change_sleep, &wait);
+                       if (ctl->card->shutdown)
+                               return -ENODEV;
                        if (signal_pending(current))
                                return -ERESTARTSYS;
                        spin_lock_irq(&ctl->read_lock);