drivers: sensor: mmc56x3: add error handling in mmc56x3_chip_init
The return code of several initialization functions was being ignored. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
5fd565e6b4
commit
48566d834d
1 changed files with 6 additions and 1 deletions
|
@ -196,11 +196,16 @@ static int mmc56x3_chip_init(const struct device *dev)
|
|||
const struct mmc56x3_config *config = &data->config;
|
||||
|
||||
ret = mmc56x3_chip_set_continuous_mode(dev, config->magn_odr);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = mmc56x3_chip_set_decimation_filter(dev, config->bw0, config->bw1);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = mmc56x3_chip_set_auto_self_reset(dev, config->auto_sr);
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue