[alsa-devel] [PATCH 2/4] ASoC: sst_platform: free the resources on fail path
Lu Guanqun
guanqun.lu at intel.com
Wed Apr 6 04:20:32 CEST 2011
Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
---
sound/soc/mid-x86/sst_platform.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index bd9d928..848ad3c 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -252,6 +252,8 @@ static int sst_platform_open(struct snd_pcm_substream *substream)
ret_val = register_sst_card(stream->sstdrv_ops);
if (ret_val) {
pr_err("sst: sst card registration failed\n");
+ kfree(stream->sstdrv_ops);
+ kfree(stream);
return ret_val;
}
runtime->private_data = stream;
More information about the Alsa-devel
mailing list