summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-02-18 16:11:03 +0530
committerMark Brown <broonie@linaro.org>2014-02-20 01:28:12 +0900
commita1985d469d5c2881b34baee32e4fc74447748b44 (patch)
tree4ff1de59ff34c8f2f765b3f3f54985474138087f /drivers
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadblackbird-op-linux-a1985d469d5c2881b34baee32e4fc74447748b44.tar.gz
blackbird-op-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')
-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;
OpenPOWER on IntegriCloud