* [PATCH 5/8] ASoC: smdk_wm9713: fix resource leak in smdk_init error path
2010-11-25 7:06 [PATCH 0/8] ASoC: fix resource leak in error paths Axel Lin
@ 2010-11-25 7:11 ` Axel Lin
0 siblings, 0 replies; 3+ messages in thread
From: Axel Lin @ 2010-11-25 7:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Jaswinder Singh Brar, Liam Girdwood, Mark Brown, alsa-devel
Fix the error path to properly free allocated resources.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/samsung/smdk_wm9713.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/sound/soc/samsung/smdk_wm9713.c b/sound/soc/samsung/smdk_wm9713.c
index 7ce2430..238cb3a 100644
--- a/sound/soc/samsung/smdk_wm9713.c
+++ b/sound/soc/samsung/smdk_wm9713.c
@@ -70,24 +70,27 @@ static int __init smdk_init(void)
ret = platform_device_add(smdk_snd_wm9713_device);
if (ret)
- goto err;
+ goto err1;
smdk_snd_ac97_device = platform_device_alloc("soc-audio", -1);
if (!smdk_snd_ac97_device) {
ret = -ENOMEM;
- goto err;
+ goto err2;
}
platform_set_drvdata(smdk_snd_ac97_device, &smdk);
ret = platform_device_add(smdk_snd_ac97_device);
- if (ret) {
- platform_device_put(smdk_snd_ac97_device);
- goto err;
- }
+ if (ret)
+ goto err3;
return 0;
-err:
+
+err3:
+ platform_device_put(smdk_snd_ac97_device);
+err2:
+ platform_device_del(smdk_snd_wm9713_device);
+err1:
platform_device_put(smdk_snd_wm9713_device);
return ret;
}
--
1.7.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 5/8] ASoC: smdk_wm9713: fix resource leak in smdk_init error path
@ 2010-11-25 8:16 ` JASWINDERSINGH BRAR
0 siblings, 0 replies; 3+ messages in thread
From: JASWINDERSINGH BRAR @ 2010-11-25 8:16 UTC (permalink / raw)
To: Axel Lin, linux-kernel
Cc: alsa-devel@alsa-project.org, Mark Brown, Liam Girdwood
------- Original Message -------
Sender : Axel Lin<axel.lin@gmail.com>
Date : Nov 25, 2010 16:11 (GMT+09:00)
Title : [PATCH 5/8] ASoC: smdk_wm9713: fix resource leak in smdk_init error path
> Fix the error path to properly free allocated resources.
Acked-by: Jassi Brar <jassi.brar@samsung.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5/8] ASoC: smdk_wm9713: fix resource leak in smdk_init error path
@ 2010-11-25 8:16 ` JASWINDERSINGH BRAR
0 siblings, 0 replies; 3+ messages in thread
From: JASWINDERSINGH BRAR @ 2010-11-25 8:16 UTC (permalink / raw)
To: Axel Lin, linux-kernel
Cc: Liam Girdwood, Mark Brown, alsa-devel@alsa-project.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=windows-1252, Size: 461 bytes --]
------- Original Message -------
Sender : Axel Lin<axel.lin@gmail.com>
Date : Nov 25, 2010 16:11 (GMT+09:00)
Title : [PATCH 5/8] ASoC: smdk_wm9713: fix resource leak in smdk_init error path
> Fix the error path to properly free allocated resources.
Acked-by: Jassi Brar <jassi.brar@samsung.com>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-25 8:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-25 8:16 [PATCH 5/8] ASoC: smdk_wm9713: fix resource leak in smdk_init error path JASWINDERSINGH BRAR
2010-11-25 8:16 ` JASWINDERSINGH BRAR
-- strict thread matches above, loose matches on Subject: below --
2010-11-25 7:06 [PATCH 0/8] ASoC: fix resource leak in error paths Axel Lin
2010-11-25 7:11 ` [PATCH 5/8] ASoC: smdk_wm9713: fix resource leak in smdk_init error path Axel Lin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.