diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-09-21 10:16:01 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-27 00:31:55 (GMT) |
commit | ad31d250bf60c8e4c990e8b0daeedbaa2d6884a9 (patch) | |
tree | 31f612b6afe35a33ab5e40e01ba699126ec2ffaf /drivers/staging/iio/magnetometer | |
parent | 7c6c936832a46e86b0fac654923ce5015bdc80ee (diff) | |
download | linux-ad31d250bf60c8e4c990e8b0daeedbaa2d6884a9.tar.xz |
staging:iio:magnetometer:ak8975: Fix probe() error-handling
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>
Acked-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/magnetometer')
-rw-r--r-- | 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 9c53383..ab0e26c 100644 --- a/drivers/staging/iio/magnetometer/ak8975.c +++ b/drivers/staging/iio/magnetometer/ak8975.c @@ -513,7 +513,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); |