summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp3971.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-02-18 11:41:03 +0100
committerMark Brown <broonie@linaro.org>2014-02-19 17:28:12 +0100
commita1985d469d5c2881b34baee32e4fc74447748b44 (patch)
tree4ff1de59ff34c8f2f765b3f3f54985474138087f /drivers/regulator/lp3971.c
parentLinus 3.14-rc1 (diff)
downloadlinux-a1985d469d5c2881b34baee32e4fc74447748b44.tar.xz
linux-a1985d469d5c2881b34baee32e4fc74447748b44.zip
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>
Diffstat (limited to 'drivers/regulator/lp3971.c')
-rw-r--r--drivers/regulator/lp3971.c2
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;