mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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: Pascal Huerst <pascal.huerst@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
92e963f50f
commit
61c4a1ac4d
@ -31,7 +31,10 @@ static int sigmadsp_write_i2c(void *control_data,
|
||||
|
||||
kfree(buf);
|
||||
|
||||
return ret;
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sigmadsp_read_i2c(void *control_data,
|
||||
|
Loading…
Reference in New Issue
Block a user