All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Wrong variable returned on error
@ 2009-12-08  0:34 ` Roel Kluin
  0 siblings, 0 replies; 5+ messages in thread
From: Roel Kluin @ 2009-12-08  0:34 UTC (permalink / raw)
  To: javier.martin, Liam Girdwood, Mark Brown, alsa-devel,
	Andrew Morton

The wrong variable was returned in the case of an error

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 sound/soc/imx/mx1_mx2-pcm.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/imx/mx1_mx2-pcm.c b/sound/soc/imx/mx1_mx2-pcm.c
index b838665..bffffcd 100644
--- a/sound/soc/imx/mx1_mx2-pcm.c
+++ b/sound/soc/imx/mx1_mx2-pcm.c
@@ -322,12 +322,12 @@ static int mx1_mx2_pcm_open(struct snd_pcm_substream *substream)
 
 	pr_debug("%s: Requesting dma channel (%s)\n", __func__,
 						prtd->dma_params->name);
-	prtd->dma_ch = imx_dma_request_by_prio(prtd->dma_params->name,
-						DMA_PRIO_HIGH);
-	if (prtd->dma_ch < 0) {
+	ret = imx_dma_request_by_prio(prtd->dma_params->name, DMA_PRIO_HIGH);
+	if (ret < 0) {
 		printk(KERN_ERR "Error %d requesting dma channel\n", ret);
 		return ret;
 	}
+	prtd->dma_ch = ret;
 	imx_dma_config_burstlen(prtd->dma_ch,
 				prtd->dma_params->watermark_level);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-08 12:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08  0:34 [PATCH] ASoC: Wrong variable returned on error Roel Kluin
2009-12-08  0:34 ` Roel Kluin
2009-12-08 11:19 ` Liam Girdwood
2009-12-08 12:56 ` Mark Brown
2009-12-08 12:56   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.