Commit 27ef7f00 authored by Axel Lin's avatar Axel Lin Committed by Liam Girdwood

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: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 1b69d8e3
......@@ -377,7 +377,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
if (count != 1)
return -EIO;
ret = i2c_smbus_read_byte_data(i2c, reg);
if (ret < 0 || count != 1)
if (ret < 0)
return -EIO;
*dest = ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment