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>
This commit is contained in:
parent
38dbfb59d1
commit
a1985d469d
@ -327,7 +327,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
ret = i2c_smbus_read_byte_data(i2c, reg);
|
ret = i2c_smbus_read_byte_data(i2c, reg);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return -EIO;
|
return ret;
|
||||||
|
|
||||||
*dest = ret;
|
*dest = ret;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user