alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Richard Zhao <richard.zhao@freescale.com>
To: alsa-devel@alsa-project.org
Cc: s.hauer@pengutronix.de, shawn.guo@linaro.org,
	Richard Zhao <richard.zhao@freescale.com>,
	lrg@ti.com, broonie@opensource.wolfsonmicro.com
Subject: [PATCH 2/2] ASoC: imx-pcm-dma: open function failed when snd_dmaengine_pcm_open fail
Date: Tue, 18 Sep 2012 17:20:06 +0800	[thread overview]
Message-ID: <1347960006-23681-2-git-send-email-richard.zhao@freescale.com> (raw)
In-Reply-To: <1347960006-23681-1-git-send-email-richard.zhao@freescale.com>

snd_imx_open should return error code returned by snd_dmaengine_pcm_open.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
---
 sound/soc/fsl/imx-pcm-dma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c
index a23505a..9a15bc4 100644
--- a/sound/soc/fsl/imx-pcm-dma.c
+++ b/sound/soc/fsl/imx-pcm-dma.c
@@ -120,7 +120,7 @@ static int snd_imx_open(struct snd_pcm_substream *substream)
 	ret = snd_dmaengine_pcm_open(substream, filter, dma_data);
 	if (ret) {
 		kfree(dma_data);
-		return 0;
+		return ret;
 	}
 
 	snd_dmaengine_pcm_set_data(substream, dma_data);
-- 
1.7.9.5

  reply	other threads:[~2012-09-18  9:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18  9:20 [PATCH 1/2] ASoC: imx-pcm-dma: check kzalloc return value in function snd_imx_open Richard Zhao
2012-09-18  9:20 ` Richard Zhao [this message]
2012-09-19  2:52 ` 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=1347960006-23681-2-git-send-email-richard.zhao@freescale.com \
    --to=richard.zhao@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    /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).