diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-11-08 08:51:52 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-11-08 08:51:52 -0800 |
commit | fa8e2458ecfc959cd627e25ba86d8eddcb63c887 (patch) | |
tree | d8c9dec3dac8e97e8591e6507a619959449d6344 /sound/core/control.c | |
parent | d56a289be2ce01d1aa426a6cf45dede14a8db41e (diff) | |
parent | 3d70f8c617a436c7146ecb81df2265b4626dfe89 (diff) | |
download | op-kernel-dev-fa8e2458ecfc959cd627e25ba86d8eddcb63c887.zip op-kernel-dev-fa8e2458ecfc959cd627e25ba86d8eddcb63c887.tar.gz |
Merge tag 'v3.7-rc4' into next to sync up Wacom bits
Linux 3.7-rc4
Diffstat (limited to 'sound/core/control.c')
-rw-r--r-- | sound/core/control.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 7e86a5b..8c7c2c9 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -86,6 +86,7 @@ static int snd_ctl_open(struct inode *inode, struct file *file) write_lock_irqsave(&card->ctl_files_rwlock, flags); list_add_tail(&ctl->list, &card->ctl_files); write_unlock_irqrestore(&card->ctl_files_rwlock, flags); + snd_card_unref(card); return 0; __error: @@ -93,6 +94,8 @@ static int snd_ctl_open(struct inode *inode, struct file *file) __error2: snd_card_file_remove(card, file); __error1: + if (card) + snd_card_unref(card); return err; } @@ -1434,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); |