[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1317779135.2595.1.camel@phoenix>
Date:	Wed, 05 Oct 2011 09:45:34 +0800
From:	Axel Lin <axel.lin@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Timur Tabi <timur@...escale.com>,
	Arnaud Patard <arnaud.patard@...-net.org>,
	Liam Girdwood <lrg@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	alsa-devel@...a-project.org
Subject: [PATCH] ASoC: Return early with -EINVAL if invalid dai format is
 detected
Signed-off-by: Axel Lin <axel.lin@...il.com>
Cc: Timur Tabi <timur@...escale.com>
Cc: Arnaud Patard <arnaud.patard@...-net.org>
---
 sound/soc/codecs/cs4270.c  |    2 +-
 sound/soc/codecs/cs42l51.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 5830c93..e645d67 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -271,7 +271,7 @@ static int cs4270_set_dai_fmt(struct snd_soc_dai *codec_dai,
 		break;
 	default:
 		dev_err(codec->dev, "invalid dai format\n");
-		ret = -EINVAL;
+		return -EINVAL;
 	}
 
 	/* set master/slave audio interface */
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 286878d..779294b 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -298,7 +298,7 @@ static int cs42l51_set_dai_fmt(struct snd_soc_dai *codec_dai,
 		break;
 	default:
 		dev_err(codec->dev, "invalid DAI format\n");
-		ret = -EINVAL;
+		return -EINVAL;
 	}
 
 	switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
-- 
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
