summaryrefslogtreecommitdiff
path: root/drivers/iio/magnetometer/st_magn_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/magnetometer/st_magn_i2c.c')
-rw-r--r--drivers/iio/magnetometer/st_magn_i2c.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/iio/magnetometer/st_magn_i2c.c b/drivers/iio/magnetometer/st_magn_i2c.c
index fa78f0a3b53e..0a5117dffcf4 100644
--- a/drivers/iio/magnetometer/st_magn_i2c.c
+++ b/drivers/iio/magnetometer/st_magn_i2c.c
@@ -86,16 +86,7 @@ static int st_magn_i2c_probe(struct i2c_client *client,
if (err)
return err;
- err = st_magn_common_probe(indio_dev);
- if (err < 0)
- goto st_magn_power_off;
-
- return 0;
-
-st_magn_power_off:
- st_sensors_power_disable(indio_dev);
-
- return err;
+ return st_magn_common_probe(indio_dev);
}
static int st_magn_i2c_remove(struct i2c_client *client)
@@ -104,8 +95,6 @@ static int st_magn_i2c_remove(struct i2c_client *client)
st_magn_common_remove(indio_dev);
- st_sensors_power_disable(indio_dev);
-
return 0;
}