提交 61c4a1ac 编写于 作者: P Pascal Huerst 提交者: Mark Brown

ASoC: sigmadsp: Fix missleading return value

Forwarding the return value of i2c_master_send, leads to errors
later on, since i2c_master_send returns the number of bytes
transmittet. Check for ret < 0 instead and return 0 otherwise.
Signed-off-by: NPascal Huerst <pascal.huerst@gmail.com>
Acked-by: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 92e963f5
......@@ -31,7 +31,10 @@ static int sigmadsp_write_i2c(void *control_data,
kfree(buf);
if (ret < 0)
return ret;
return 0;
}
static int sigmadsp_read_i2c(void *control_data,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册