提交 c2097409 编写于 作者: D Dan Carpenter 提交者: Mark Brown

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: NDan Carpenter <error27@gmail.com>
Acked-by: NLars-Peter Clausen <lars@metafoo.de>
Acked-by: NLiam Girdwood <lrg@ti.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 29376bc7
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册