diff options
author | Peter Meerwald-Stadler <pmeerw@pmeerw.net> | 2017-10-27 22:45:35 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-12-02 13:40:44 +0300 |
commit | d0b950c73dee67c2232482dbb6949b7a4f25a828 (patch) | |
tree | add5713e5c28e5c8a7af33ac1ecf7f86f1814921 /drivers/iio/health/max30102.c | |
parent | 7b0b0ec1576e36beb6915c81dec2db9c077270d8 (diff) | |
download | linux-d0b950c73dee67c2232482dbb6949b7a4f25a828.tar.xz |
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/max30102.c')
-rw-r--r-- | drivers/iio/health/max30102.c | 5 |
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) |