aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-11 13:35:31 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-11 13:35:31 -0500
commit749dfc70554f2c9e6624ac843d66571265ed9338 (patch)
treebf591255b3f158222f90852d53c4279e6e7e9ced /sound/core
parent74f5ec29ae93aa42c49f4285c20c457afe937881 (diff)
parent0992a5d029181421877a716eaf99145828ff7eae (diff)
Merge branch 'upstream-fixes'
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/control.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index abd62f943726..0c29679a8576 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -959,17 +959,15 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
959 kctl.private_free = snd_ctl_elem_user_free; 959 kctl.private_free = snd_ctl_elem_user_free;
960 _kctl = snd_ctl_new(&kctl, access); 960 _kctl = snd_ctl_new(&kctl, access);
961 if (_kctl == NULL) { 961 if (_kctl == NULL) {
962 kfree(_kctl->private_data); 962 kfree(ue);
963 return -ENOMEM; 963 return -ENOMEM;
964 } 964 }
965 _kctl->private_data = ue; 965 _kctl->private_data = ue;
966 for (idx = 0; idx < _kctl->count; idx++) 966 for (idx = 0; idx < _kctl->count; idx++)
967 _kctl->vd[idx].owner = file; 967 _kctl->vd[idx].owner = file;
968 err = snd_ctl_add(card, _kctl); 968 err = snd_ctl_add(card, _kctl);
969 if (err < 0) { 969 if (err < 0)
970 snd_ctl_free_one(_kctl);
971 return err; 970 return err;
972 }
973 971
974 down_write(&card->controls_rwsem); 972 down_write(&card->controls_rwsem);
975 card->user_ctl_count++; 973 card->user_ctl_count++;