rk: revert 20f3d0b+v3.0.66 to v3.0
[firefly-linux-kernel-4.4.55.git] / sound / core / control.c
index ce46a9ef8563a25e1f234d86bab60aa26b3d6e54..f8c5be46451058ba5a7f25d9a81195fd02643f92 100644 (file)
@@ -85,7 +85,6 @@ 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,8 +92,6 @@ 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;
 }
 
@@ -1363,8 +1360,6 @@ 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);