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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/magnetometer/st_magn_i2c.c b/drivers/iio/magnetometer/st_magn_i2c.c
index d5d565639bed..fdba480a12be 100644
--- a/drivers/iio/magnetometer/st_magn_i2c.c
+++ b/drivers/iio/magnetometer/st_magn_i2c.c
@@ -79,7 +79,9 @@ static int st_magn_i2c_probe(struct i2c_client *client,
mdata = iio_priv(indio_dev);
mdata->sensor_settings = (struct st_sensor_settings *)settings;
- st_sensors_i2c_configure(indio_dev, client, mdata);
+ err = st_sensors_i2c_configure(indio_dev, client);
+ if (err < 0)
+ return err;
err = st_magn_common_probe(indio_dev);
if (err < 0)