summaryrefslogtreecommitdiff
path: root/drivers/iio/health
diff options
context:
space:
mode:
authorPeter Meerwald-Stadler <pmeerw@pmeerw.net>2017-10-27 21:45:35 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2017-12-02 10:40:44 +0000
commitd0b950c73dee67c2232482dbb6949b7a4f25a828 (patch)
treeadd5713e5c28e5c8a7af33ac1ecf7f86f1814921 /drivers/iio/health
parent7b0b0ec1576e36beb6915c81dec2db9c077270d8 (diff)
iio: health: max30102: Check retval of powermode function
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/health')
-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)