From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lu Guanqun Subject: [PATCH 2/4] ASoC: sst_platform: free the resources on fail path Date: Wed, 06 Apr 2011 10:20:32 +0800 Message-ID: <20110406022032.28406.70693.stgit@localhost> References: <20110406022026.28406.98577.stgit@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 76E35103811 for ; Wed, 6 Apr 2011 04:20:09 +0200 (CEST) In-Reply-To: <20110406022026.28406.98577.stgit@localhost> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: ALSA Cc: Koul Vinod , Mark Brown , Takashi Iwai , Harsha Priya , Liam Girdwood List-Id: alsa-devel@alsa-project.org Signed-off-by: Lu Guanqun --- 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;