From 370066e2b13bafa8e742673f658e617b6ed143a4 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Tue, 8 Dec 2009 01:34:22 +0100 Subject: [PATCH] ASoC: Wrong variable returned on error The wrong variable was returned in the case of an error Signed-off-by: Roel Kluin Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/imx/mx1_mx2-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/imx/mx1_mx2-pcm.c b/sound/soc/imx/mx1_mx2-pcm.c index b83866529397..bffffcd5ff34 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); -- 2.30.2