lp3971: remove redundant checking for count in lp3971_i2c_read()
PATCH 2/2 lp3971: remove redundant checking for count in lp3971_i2c_read()
We already check count value before calling i2c_smbus_read_byte_data(), no need to check it again.
Signed-off-by Axel Lin <[email protected]>
--- drivers/regulator/lp3971.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/lp3971.c +1 -1
@@ -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;
Signature · 1 line
1.5.4.3
Quoted 4 lines · Axel Lin
We already check count value before calling
i2c_smbus_read_byte_data(), no need to check it again.Signed-off-by Axel Lin <[email protected]>
Acked-by Mark Brown <[email protected]>