提交 25e5eaf1 编写于 作者: C Christophe JAILLET 提交者: 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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 67756e31
......@@ -956,6 +956,7 @@ static int snd_amd7930_create(struct snd_card *card,
if (!amd->regs) {
snd_printk(KERN_ERR
"amd7930-%d: Unable to map chip registers.\n", dev);
kfree(amd);
return -EIO;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册