drivers: sensors: tmp112 fix config register updating

The function that sets the driver's state of the sensor's
config register has a bug. This commit fixes that.

Signed-off-by: Pete Dietl <petedietl@gmail.com>
This commit is contained in:
Pete Dietl 2021-12-14 10:20:32 +01:00 committed by Carles Cufí
commit 2b62282d46

View file

@ -53,7 +53,7 @@ static int tmp112_update_config(const struct device *dev, uint16_t mask,
rc = tmp112_reg_write(dev->config, TMP112_REG_CONFIG, new_val);
if (rc == 0) {
data->config_reg = val;
data->config_reg = new_val;
}
return rc;