Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2097409 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 29376bc7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)