regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
authorAxel Lin <axel.lin@gmail.com>
Fri, 6 Aug 2010 00:09:14 +0000 (08:09 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Wed, 11 Aug 2010 10:38:02 +0000 (11:38 +0100)
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>
drivers/regulator/lp3971.c

index 8ae3732eb24bcd28e414049b583d3644fa8ffd17..5362289c7d69d3cb12a6e0a43f9f1e0c7951f8ef 100644 (file)
@@ -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;