aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp3971.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-02-18 05:41:03 -0500
committerMark Brown <broonie@linaro.org>2014-02-19 11:28:12 -0500
commita1985d469d5c2881b34baee32e4fc74447748b44 (patch)
tree4ff1de59ff34c8f2f765b3f3f54985474138087f /drivers/regulator/lp3971.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
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,
327 return -EIO; 327 return -EIO;
328 ret = i2c_smbus_read_byte_data(i2c, reg); 328 ret = i2c_smbus_read_byte_data(i2c, reg);
329 if (ret < 0) 329 if (ret < 0)
330 return -EIO; 330 return ret;
331 331
332 *dest = ret; 332 *dest = ret;
333 return 0; 333 return 0;