aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/magnetometer/st_magn_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/magnetometer/st_magn_buffer.c')
-rw-r--r--drivers/iio/magnetometer/st_magn_buffer.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/iio/magnetometer/st_magn_buffer.c b/drivers/iio/magnetometer/st_magn_buffer.c
index 708857bdb47..bf427dc0d22 100644
--- a/drivers/iio/magnetometer/st_magn_buffer.c
+++ b/drivers/iio/magnetometer/st_magn_buffer.c
@@ -25,16 +25,7 @@
static int st_magn_buffer_preenable(struct iio_dev *indio_dev)
{
- int err;
-
- err = st_sensors_set_enable(indio_dev, true);
- if (err < 0)
- goto st_magn_set_enable_error;
-
- err = iio_sw_buffer_preenable(indio_dev);
-
-st_magn_set_enable_error:
- return err;
+ return st_sensors_set_enable(indio_dev, true);
}
static int st_magn_buffer_postenable(struct iio_dev *indio_dev)