From a1985d469d5c2881b34baee32e4fc74447748b44 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 18 Feb 2014 16:11:03 +0530 Subject: regulator: lp3971: Do not hardcode return value Propagate the error value returned by the function instead. Signed-off-by: Sachin Kamat Signed-off-by: Mark Brown --- drivers/regulator/lp3971.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator/lp3971.c') diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index 3b1102b7507..66fd2330dca 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; -- cgit v1.2.3-70-g09d2