From: Lu Guanqun Date: Wed, 6 Apr 2011 02:20:32 +0000 (+0800) Subject: ASoC: sst_platform: free the resources on fail path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=83a3fd3cf0bfdadfdfc633f6437f9121e28252b9;p=mv-sheeva.git ASoC: sst_platform: free the resources on fail path Signed-off-by: Lu Guanqun Signed-off-by: Mark Brown --- diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index bd9d928dc76..848ad3ce732 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;