- memset(&uinfo, 0, sizeof(uinfo));
- if (kctl->info(kctl, &uinfo))
+ uinfo = kmalloc(sizeof(*uinfo), GFP_KERNEL);
+ if (! uinfo) {
+ up_read(&mixer->card->controls_rwsem);
+ return -ENOMEM;
+ }
+
+ memset(uinfo, 0, sizeof(*uinfo));
+ if (kctl->info(kctl, uinfo)) {
+ up_read(&mixer->card->controls_rwsem);