* 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; 2+ 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] 2+ messages in thread* [PATCH 0/8] ASoC: fix resource leak in error paths
@ 2010-11-25 7:06 Axel Lin
2010-11-25 7:11 ` [PATCH 5/8] ASoC: smdk_wm9713: fix resource leak in smdk_init error path Axel Lin
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2010-11-25 7:06 UTC (permalink / raw)
To: linux-kernel
Cc: Liam Girdwood, Mark Brown, alsa-devel, Jon Smirl, Sergey Lapin,
Sedji Gaouaou, Jaswinder Singh Brar, Mika Westerberg,
Sascha Hauer
This serial of patches fix resource leak in error paths.
Axel Lin (8):
ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init
error path
ASoC: pcm030-audio-fabric: fix resource leak in pcm030_fabric_init
error path
ASoC: snd-soc-afeb9260: remove unneeded platform_device_del in error
path
ASoC: sam9g20_wm8731: fix resource leak in at91sam9g20ek_init error
path
ASoC: smdk_wm9713: fix resource leak in smdk_init error path
ASoC: simone: fix resource leak in simone_init error path
ASoC: imx-ssi: fix resource leak
ASoC: phycore-ac97: fix resource leak
sound/soc/atmel/sam9g20_wm8731.c | 5 ++++-
sound/soc/atmel/snd-soc-afeb9260.c | 1 -
sound/soc/ep93xx/simone.c | 18 ++++++++++--------
sound/soc/fsl/efika-audio-fabric.c | 1 +
sound/soc/fsl/pcm030-audio-fabric.c | 1 +
sound/soc/imx/imx-ssi.c | 15 +++++++++++----
sound/soc/imx/phycore-ac97.c | 28 +++++++++++++++++++++-------
sound/soc/samsung/smdk_wm9713.c | 17 ++++++++++-------
8 files changed, 58 insertions(+), 28 deletions(-)
--
1.7.2
^ permalink raw reply [flat|nested] 2+ messages in thread* [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; 2+ 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] 2+ messages in thread
end of thread, other threads:[~2010-11-25 8:16 UTC | newest]
Thread overview: 2+ 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
-- 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox