aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/control.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-11-13 16:25:38 -0500
committerTony Lindgren <tony@atomide.com>2012-11-13 16:25:38 -0500
commit89ab216b33ba9405880fd3d89531305a931bc70f (patch)
tree8f6428ce51ecaed6f6e1379c036dbe341eb71e34 /sound/core/control.c
parentc9d501e5cb0238910337213e12a09127221c35d8 (diff)
parent46bf4a562207c5ebd24e1dde5e5ee326cd3d6b91 (diff)
Merge branch 'omap-for-v3.8/pm' into omap-for-v3.8/clock
Diffstat (limited to 'sound/core/control.c')
-rw-r--r--sound/core/control.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 7e86a5b9f3b5..8c7c2c9bba61 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)
86 write_lock_irqsave(&card->ctl_files_rwlock, flags); 86 write_lock_irqsave(&card->ctl_files_rwlock, flags);
87 list_add_tail(&ctl->list, &card->ctl_files); 87 list_add_tail(&ctl->list, &card->ctl_files);
88 write_unlock_irqrestore(&card->ctl_files_rwlock, flags); 88 write_unlock_irqrestore(&card->ctl_files_rwlock, flags);
89 snd_card_unref(card);
89 return 0; 90 return 0;
90 91
91 __error: 92 __error:
@@ -93,6 +94,8 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
93 __error2: 94 __error2:
94 snd_card_file_remove(card, file); 95 snd_card_file_remove(card, file);
95 __error1: 96 __error1:
97 if (card)
98 snd_card_unref(card);
96 return err; 99 return err;
97} 100}
98 101
@@ -1434,6 +1437,8 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer,
1434 spin_unlock_irq(&ctl->read_lock); 1437 spin_unlock_irq(&ctl->read_lock);
1435 schedule(); 1438 schedule();
1436 remove_wait_queue(&ctl->change_sleep, &wait); 1439 remove_wait_queue(&ctl->change_sleep, &wait);
1440 if (ctl->card->shutdown)
1441 return -ENODEV;
1437 if (signal_pending(current)) 1442 if (signal_pending(current))
1438 return -ERESTARTSYS; 1443 return -ERESTARTSYS;
1439 spin_lock_irq(&ctl->read_lock); 1444 spin_lock_irq(&ctl->read_lock);