diff mbox

ASoC: fsl: imx-pcm-fiq: Remove unneeded 'out' label

Message ID 1393212043-9002-1-git-send-email-festevam@gmail.com (mailing list archive)
State Accepted
Commit ea9f8535a46d3753649b6e28f47e3109ca63284a
Headers show

Commit Message

Fabio Estevam Feb. 24, 2014, 3:20 a.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

Instead of jumping to the 'out' label, just return the error code immediately.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/fsl/imx-pcm-fiq.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Mark Brown Feb. 24, 2014, 5:41 a.m. UTC | #1
On Mon, Feb 24, 2014 at 12:20:43AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Instead of jumping to the 'out' label, just return the error code immediately.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/fsl/imx-pcm-fiq.c b/sound/soc/fsl/imx-pcm-fiq.c
index 6553202..7abf6a0 100644
--- a/sound/soc/fsl/imx-pcm-fiq.c
+++ b/sound/soc/fsl/imx-pcm-fiq.c
@@ -270,18 +270,17 @@  static int imx_pcm_new(struct snd_soc_pcm_runtime *rtd)
 		ret = imx_pcm_preallocate_dma_buffer(pcm,
 			SNDRV_PCM_STREAM_PLAYBACK);
 		if (ret)
-			goto out;
+			return ret;
 	}
 
 	if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
 		ret = imx_pcm_preallocate_dma_buffer(pcm,
 			SNDRV_PCM_STREAM_CAPTURE);
 		if (ret)
-			goto out;
+			return ret;
 	}
 
-out:
-	return ret;
+	return 0;
 }
 
 static int ssi_irq = 0;