regulator: lp3971: Do not hardcode return value
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 18 Feb 2014 10:41:03 +0000 (16:11 +0530)
committerMark Brown <broonie@linaro.org>
Wed, 19 Feb 2014 16:28:12 +0000 (01:28 +0900)
Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/lp3971.c

index 3b1102b..66fd233 100644 (file)
@@ -327,7 +327,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
                return -EIO;
        ret = i2c_smbus_read_byte_data(i2c, reg);
        if (ret < 0)
-               return -EIO;
+               return ret;
 
        *dest = ret;
        return 0;