diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-02-18 14:41:03 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-19 20:28:12 +0400 |
commit | a1985d469d5c2881b34baee32e4fc74447748b44 (patch) | |
tree | 4ff1de59ff34c8f2f765b3f3f54985474138087f | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) | |
download | linux-a1985d469d5c2881b34baee32e4fc74447748b44.tar.xz |
regulator: lp3971: Do not hardcode return value
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>
-rw-r--r-- | drivers/regulator/lp3971.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index 3b1102b75071..66fd2330dca0 100644 --- a/drivers/regulator/lp3971.c +++ b/drivers/regulator/lp3971.c @@ -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; |