lkml.org 
[lkml]   [2011]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/3] staging:iio:magnetometer:ak8975: Fix probe() error-handling
    Date
    Fix ak8975_probe() to jump to the appropriate exit labels when an error
    occurs. With the previous code, some cleanup actions were being skipped
    for some error conditions.

    Signed-off-by: Stephen Warren <swarren@nvidia.com>
    ---
    drivers/staging/iio/magnetometer/ak8975.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/staging/iio/magnetometer/ak8975.c b/drivers/staging/iio/magnetometer/ak8975.c
    index 79ed183..d92b3d0 100644
    --- a/drivers/staging/iio/magnetometer/ak8975.c
    +++ b/drivers/staging/iio/magnetometer/ak8975.c
    @@ -510,7 +510,7 @@ static int ak8975_probe(struct i2c_client *client,
    err = ak8975_setup(client);
    if (err < 0) {
    dev_err(&client->dev, "AK8975 initialization fails\n");
    - goto exit_gpio;
    + goto exit_free_iio;
    }

    i2c_set_clientdata(client, indio_dev);
    --
    1.7.0.4


    \
     
     \ /
      Last update: 2011-08-31 21:43    [W:0.022 / U:1.812 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site