diff options
Diffstat (limited to 'sound/sound_core.c')
-rw-r--r-- | sound/sound_core.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/sound_core.c b/sound/sound_core.c index 7c2d677a2df5..cb61317df509 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c | |||
@@ -576,8 +576,6 @@ static int soundcore_open(struct inode *inode, struct file *file) | |||
576 | struct sound_unit *s; | 576 | struct sound_unit *s; |
577 | const struct file_operations *new_fops = NULL; | 577 | const struct file_operations *new_fops = NULL; |
578 | 578 | ||
579 | lock_kernel (); | ||
580 | |||
581 | chain=unit&0x0F; | 579 | chain=unit&0x0F; |
582 | if(chain==4 || chain==5) /* dsp/audio/dsp16 */ | 580 | if(chain==4 || chain==5) /* dsp/audio/dsp16 */ |
583 | { | 581 | { |
@@ -630,18 +628,19 @@ static int soundcore_open(struct inode *inode, struct file *file) | |||
630 | const struct file_operations *old_fops = file->f_op; | 628 | const struct file_operations *old_fops = file->f_op; |
631 | file->f_op = new_fops; | 629 | file->f_op = new_fops; |
632 | spin_unlock(&sound_loader_lock); | 630 | spin_unlock(&sound_loader_lock); |
633 | if(file->f_op->open) | 631 | |
632 | if (file->f_op->open) | ||
634 | err = file->f_op->open(inode,file); | 633 | err = file->f_op->open(inode,file); |
634 | |||
635 | if (err) { | 635 | if (err) { |
636 | fops_put(file->f_op); | 636 | fops_put(file->f_op); |
637 | file->f_op = fops_get(old_fops); | 637 | file->f_op = fops_get(old_fops); |
638 | } | 638 | } |
639 | |||
639 | fops_put(old_fops); | 640 | fops_put(old_fops); |
640 | unlock_kernel(); | ||
641 | return err; | 641 | return err; |
642 | } | 642 | } |
643 | spin_unlock(&sound_loader_lock); | 643 | spin_unlock(&sound_loader_lock); |
644 | unlock_kernel(); | ||
645 | return -ENODEV; | 644 | return -ENODEV; |
646 | } | 645 | } |
647 | 646 | ||