Skip to contentSkip to conversation

SOC: fix tests in cs4270_hw_params()

PATCH Applied Roel Kluin 3 participants 3 messages Apr 17, 2008

Subsystems (3)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 SOC: fix tests in cs4270_hw_params()

cs4270_hw_params does several times:

ret = snd_soc_write()
if (ret < 0)

	...

This only works when ret is signed.

---

sound/soc/codecs/cs4270.c +1 -1
index bf2ab72..e73fcfd 100644
@@ -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;
Applied
#1 lore raw

At Thu, 17 Apr 2008 17:45:39 +0200,

Quoted 10 lines · Roel Kluin

cs4270_hw_params does several times:

ret = snd_soc_write()
if (ret < 0)

	...

This only works when ret is signed.

Applied to ALSA tree. Thanks.

Takashi

Quoted 19 lines

---

sound/soc/codecs/cs4270.c +1 -1
index bf2ab72..e73fcfd 100644
@@ -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;

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
In reply to Roel Kluin
Quoted 9 lines · Roel Kluin

cs4270_hw_params does several times:

ret = snd_soc_write()
if (ret < 0)

	...

This only works when ret is signed.

Thanks, but in the future, please remember to CC the author of the driver when posting patches for it.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale