Skip to content

Commit

Permalink
ASoC: adau1701: signedness bug in adau1701_write()
Browse files Browse the repository at this point in the history
"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 <error27@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Dan Carpenter authored and Mark Brown committed Jun 20, 2011
1 parent 29376bc commit c209740
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/codecs/adau1701.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c209740

Please sign in to comment.