aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-14 15:18:01 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-14 15:18:01 -0500
commitf33b5d783b4f56be5ace6a1c98fb5f76b2d2d07d (patch)
treeb027b5f3429d416b3da5b9195024007dab062a5e /sound
parente935d5da8e5d12fabe5b632736c50eae0427e8c8 (diff)
parent67963132638e67ad3c5aa16765e6f3f2f3cdd85c (diff)
Merge ../linux-2.6
Diffstat (limited to 'sound')
-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++;