lkml.org 
[lkml]   [2014]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 07/15] regulator: lp3971: Do not hardcode return value
    Date
    Propagate the error value returned by the function instead.

    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    ---
    drivers/regulator/lp3971.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    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;
    --
    1.7.9.5


    \
     
     \ /
      Last update: 2014-02-18 12:21    [W:4.120 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site