From c20974090e9093b8b69b37543cba381336c41ab7 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 20 Jun 2011 10:11:25 +0300 Subject: [PATCH] ASoC: adau1701: signedness bug in adau1701_write() "ret" is supposed to be signed here. The current code will only return -EIO on error, instead of a more appropriate error code such as -EAGAIN etc. Signed-off-by: Dan Carpenter Acked-by: Lars-Peter Clausen Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/codecs/adau1701.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index 6c01bb64912..2758d5fc60d 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c @@ -140,9 +140,10 @@ static unsigned int adau1701_register_size(struct snd_soc_codec *codec, static int adau1701_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int value) { - unsigned int i, ret; + unsigned int i; unsigned int size; uint8_t buf[4]; + int ret; size = adau1701_register_size(codec, reg); if (size == 0) -- 2.41.0