regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
We already check count value before calling i2c_smbus_read_byte_data(), no need to check it again. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
@@ -377,7 +377,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
|
|||||||
if (count != 1)
|
if (count != 1)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
ret = i2c_smbus_read_byte_data(i2c, reg);
|
ret = i2c_smbus_read_byte_data(i2c, reg);
|
||||||
if (ret < 0 || count != 1)
|
if (ret < 0)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
*dest = ret;
|
*dest = ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user