summaryrefslogtreecommitdiffstats
path: root/sound/sparc
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2015-07-17 14:33:21 -0400
committerTakashi Iwai <tiwai@suse.de>2015-07-17 16:29:43 -0400
commit25e5eaf19962bd48788371e4f516bdd89ce248bc (patch)
treec068a7389a48c94495d6b11ffc47f49361f6661d /sound/sparc
parent67756e3191c90e7c0b94b8b2fb63de255b6cd337 (diff)
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/sparc')
-rw-r--r--sound/sparc/amd7930.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index 1b1a89e80d13..784ceb85b2d9 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -956,6 +956,7 @@ static int snd_amd7930_create(struct snd_card *card,
956 if (!amd->regs) { 956 if (!amd->regs) {
957 snd_printk(KERN_ERR 957 snd_printk(KERN_ERR
958 "amd7930-%d: Unable to map chip registers.\n", dev); 958 "amd7930-%d: Unable to map chip registers.\n", dev);
959 kfree(amd);
959 return -EIO; 960 return -EIO;
960 } 961 }
961 962