diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-02-28 12:25:22 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2006-02-28 12:25:22 -0500 |
commit | 9585da3729e7e27bf22818625c10ac6c64ebb609 (patch) | |
tree | 8c8d46f7f2cc933fdf75a6a75cf593a63f7b8717 /sound | |
parent | 8080d5497146d5d27d9e8e78229d1adc7fe280cf (diff) | |
parent | 6749c5507388f3fc3719f57a54b540ee83f6661a (diff) |
Merge branch 'master' of git+ssh://galak@master.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/control_compat.c | 16 | ||||
-rw-r--r-- | sound/drivers/opl3/opl3_oss.c | 2 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4236.c | 2 |
3 files changed, 13 insertions, 7 deletions
diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c index 418c6d4e5d..a529b62972 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, | |||
167 | int *countp) | 167 | int *countp) |
168 | { | 168 | { |
169 | struct snd_kcontrol *kctl; | 169 | struct snd_kcontrol *kctl; |
170 | struct snd_ctl_elem_info info; | 170 | struct snd_ctl_elem_info *info; |
171 | int err; | 171 | int err; |
172 | 172 | ||
173 | down_read(&card->controls_rwsem); | 173 | down_read(&card->controls_rwsem); |
@@ -176,13 +176,19 @@ static int get_ctl_type(struct snd_card *card, struct snd_ctl_elem_id *id, | |||
176 | up_read(&card->controls_rwsem); | 176 | up_read(&card->controls_rwsem); |
177 | return -ENXIO; | 177 | return -ENXIO; |
178 | } | 178 | } |
179 | info.id = *id; | 179 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
180 | err = kctl->info(kctl, &info); | 180 | if (info == NULL) { |
181 | up_read(&card->controls_rwsem); | ||
182 | return -ENOMEM; | ||
183 | } | ||
184 | info->id = *id; | ||
185 | err = kctl->info(kctl, info); | ||
181 | up_read(&card->controls_rwsem); | 186 | up_read(&card->controls_rwsem); |
182 | if (err >= 0) { | 187 | if (err >= 0) { |
183 | err = info.type; | 188 | err = info->type; |
184 | *countp = info.count; | 189 | *countp = info->count; |
185 | } | 190 | } |
191 | kfree(info); | ||
186 | return err; | 192 | return err; |
187 | } | 193 | } |
188 | 194 | ||
diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c index 31f1f2e25a..0345ae6476 100644 --- a/sound/drivers/opl3/opl3_oss.c +++ b/sound/drivers/opl3/opl3_oss.c | |||
@@ -146,7 +146,7 @@ void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name) | |||
146 | void snd_opl3_free_seq_oss(struct snd_opl3 *opl3) | 146 | void snd_opl3_free_seq_oss(struct snd_opl3 *opl3) |
147 | { | 147 | { |
148 | if (opl3->oss_seq_dev) { | 148 | if (opl3->oss_seq_dev) { |
149 | snd_device_free(opl3->card, opl3->oss_seq_dev); | 149 | /* The instance should have been released in prior */ |
150 | opl3->oss_seq_dev = NULL; | 150 | opl3->oss_seq_dev = NULL; |
151 | } | 151 | } |
152 | } | 152 | } |
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index 4fa4310405..99a42138be 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c | |||
@@ -414,7 +414,7 @@ static int __devinit snd_card_cs423x_pnpc(int dev, struct snd_card_cs4236 *acard | |||
414 | } | 414 | } |
415 | /* MPU initialization */ | 415 | /* MPU initialization */ |
416 | if (acard->mpu && mpu_port[dev] > 0) { | 416 | if (acard->mpu && mpu_port[dev] > 0) { |
417 | if (snd_cs423x_pnp_init_mpu(dev, acard->ctrl, cfg) < 0) | 417 | if (snd_cs423x_pnp_init_mpu(dev, acard->mpu, cfg) < 0) |
418 | goto error; | 418 | goto error; |
419 | } | 419 | } |
420 | kfree(cfg); | 420 | kfree(cfg); |