alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Lu Guanqun <guanqun.lu@intel.com>
To: ALSA <alsa-devel@alsa-project.org>
Cc: Koul Vinod <vinod.koul@intel.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Takashi Iwai <tiwai@suse.de>,
	Harsha Priya <priya.harsha@intel.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: [PATCH 2/4] ASoC: sst_platform: free the resources on fail path
Date: Wed, 06 Apr 2011 10:20:32 +0800	[thread overview]
Message-ID: <20110406022032.28406.70693.stgit@localhost> (raw)
In-Reply-To: <20110406022026.28406.98577.stgit@localhost>

Signed-off-by: Lu Guanqun <guanqun.lu@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;

  reply	other threads:[~2011-04-06  2:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06  2:20 [PATCH 1/4] ASoC: sst_platform: initialize module_name properly Lu Guanqun
2011-04-06  2:20 ` Lu Guanqun [this message]
2011-04-06  2:20 ` [PATCH 3/4] ASoC: sst_platform: unregister sst card when being closed Lu Guanqun
2011-04-06  2:20 ` [PATCH 4/4] sst: make register_sst_card more self-contained Lu Guanqun
2011-04-06 14:16 ` [PATCH 1/4] ASoC: sst_platform: initialize module_name properly Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110406022032.28406.70693.stgit@localhost \
    --to=guanqun.lu@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    --cc=priya.harsha@intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).