summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/iio/health/max30102.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
index bfda1f2f6907..3b6213af79ea 100644
--- a/drivers/iio/health/max30102.c
+++ b/drivers/iio/health/max30102.c
@@ -423,7 +423,10 @@ static int max30102_probe(struct i2c_client *client,
dev_err(&client->dev, "regmap initialization failed\n");
return PTR_ERR(data->regmap);
}
- max30102_set_powermode(data, false);
+
+ ret = max30102_set_powermode(data, false);
+ if (ret)
+ return ret;
ret = max30102_chip_init(data);
if (ret)