aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2006-02-28 11:25:22 -0600
committerKumar Gala <galak@kernel.crashing.org>2006-02-28 11:25:22 -0600
commit9585da3729e7e27bf22818625c10ac6c64ebb609 (patch)
tree8c8d46f7f2cc933fdf75a6a75cf593a63f7b8717 /sound/core
parent8080d5497146d5d27d9e8e78229d1adc7fe280cf (diff)
parent6749c5507388f3fc3719f57a54b540ee83f6661a (diff)
downloadkernel_samsung_tuna-9585da3729e7e27bf22818625c10ac6c64ebb609.zip
kernel_samsung_tuna-9585da3729e7e27bf22818625c10ac6c64ebb609.tar.gz
kernel_samsung_tuna-9585da3729e7e27bf22818625c10ac6c64ebb609.tar.bz2
Merge branch 'master' of git+ssh://galak@master.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/control_compat.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c
index 418c6d4..a529b62 100644
--- a/sound/core/control_compat.c
+++ b/sound/core/control_compat.c
@@ -167,7 +167,7 @@ static int get_ctl_type(struct snd_card *card, struct snd_ctl_elem_id *id,
int *countp)
{
struct snd_kcontrol *kctl;
- struct snd_ctl_elem_info info;
+ struct snd_ctl_elem_info *info;
int err;
down_read(&card->controls_rwsem);
@@ -176,13 +176,19 @@ static int get_ctl_type(struct snd_card *card, struct snd_ctl_elem_id *id,
up_read(&card->controls_rwsem);
return -ENXIO;
}
- info.id = *id;
- err = kctl->info(kctl, &info);
+ info = kzalloc(sizeof(*info), GFP_KERNEL);
+ if (info == NULL) {
+ up_read(&card->controls_rwsem);
+ return -ENOMEM;
+ }
+ info->id = *id;
+ err = kctl->info(kctl, info);
up_read(&card->controls_rwsem);
if (err >= 0) {
- err = info.type;
- *countp = info.count;
+ err = info->type;
+ *countp = info->count;
}
+ kfree(info);
return err;
}