Skip to content

Commit

Permalink
iio: health: max30102: Check retval of powermode function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pmeerw authored and jic23 committed Dec 2, 2017
1 parent 7b0b0ec commit d0b950c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/iio/health/max30102.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d0b950c

Please sign in to comment.