Commit 25e5eaf1 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Takashi Iwai

ALSA: sparc: Add missing kfree in error path

If 'of_ioremap' fails, then 'amd' should be freed, otherwise, there is a
memory leak.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 67756e31
...@@ -956,6 +956,7 @@ static int snd_amd7930_create(struct snd_card *card, ...@@ -956,6 +956,7 @@ static int snd_amd7930_create(struct snd_card *card,
if (!amd->regs) { if (!amd->regs) {
snd_printk(KERN_ERR snd_printk(KERN_ERR
"amd7930-%d: Unable to map chip registers.\n", dev); "amd7930-%d: Unable to map chip registers.\n", dev);
kfree(amd);
return -EIO; return -EIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment