login
Header Space

 
 

[PATCH] SOC: fix tests in cs4270_hw_params()

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <liam.girdwood@...>, <broonie@...>, <alsa-devel@...>
Cc: lkml <linux-kernel@...>
Date: Thursday, April 17, 2008 - 11:45 am

cs4270_hw_params does several times:

ret = snd_soc_write()
if (ret < 0)
	...

This only works when ret is signed.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index bf2ab72..e73fcfd 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -372,7 +372,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
 	struct snd_soc_device *socdev = rtd->socdev;
 	struct snd_soc_codec *codec = socdev->codec;
 	struct cs4270_private *cs4270 = codec->private_data;
-	unsigned int ret = 0;
+	int ret;
 	unsigned int i;
 	unsigned int rate;
 	unsigned int ratio;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] SOC: fix tests in cs4270_hw_params(), Roel Kluin, (Thu Apr 17, 11:45 am)
speck-geostationary