diff options
Diffstat (limited to 'sound/core/control.c')
| -rw-r--r-- | sound/core/control.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 037e455bb11b..73d7ba0f509f 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -63,12 +63,10 @@ static int snd_ctl_open(struct inode *inode, struct file *file) goto __error1; } err = snd_card_file_add(card, file); - if (err < 0) { - err = -ENODEV; + if (err < 0) goto __error1; - } if (!try_module_get(card->module)) { - err = -EFAULT; + err = -ENODEV; goto __error2; } ctl = kzalloc(sizeof(*ctl), GFP_KERNEL); |
