mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
[ALSA] Fix double free in error path of miro driver
Fixed the double free in error path of miro driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
531213a93f
commit
c128b82cf4
1 changed files with 0 additions and 3 deletions
|
@ -1179,20 +1179,17 @@ static int __init snd_card_miro_aci_detect(struct snd_card *card, struct snd_mir
|
|||
/* force ACI into a known state */
|
||||
for (i = 0; i < 3; i++)
|
||||
if (aci_cmd(miro, ACI_ERROR_OP, -1, -1) < 0) {
|
||||
snd_card_free(card);
|
||||
snd_printk(KERN_ERR "can't force aci into known state.\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if ((miro->aci_vendor=aci_cmd(miro, ACI_READ_IDCODE, -1, -1)) < 0 ||
|
||||
(miro->aci_product=aci_cmd(miro, ACI_READ_IDCODE, -1, -1)) < 0) {
|
||||
snd_card_free(card);
|
||||
snd_printk(KERN_ERR "can't read aci id on 0x%lx.\n", miro->aci_port);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if ((miro->aci_version=aci_cmd(miro, ACI_READ_VERSION, -1, -1)) < 0) {
|
||||
snd_card_free(card);
|
||||
snd_printk(KERN_ERR "can't read aci version on 0x%lx.\n",
|
||||
miro->aci_port);
|
||||
return -ENXIO;
|
||||
|
|
Loading…
Reference in a new issue