drivers: sensor: ntc-thermistor: Fix flipped condition

Fix the flipped condition inside this if statement.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
This commit is contained in:
Paweł Anikiel 2023-09-18 09:39:33 +00:00 committed by Maureen Helm
commit 97e15f2923

View file

@ -39,7 +39,7 @@ static int ntc_thermistor_sample_fetch(const struct device *dev, enum sensor_cha
adc_sequence_init_dt(&cfg->adc_channel, &sequence);
res = adc_read(cfg->adc_channel.dev, &sequence);
if (res) {
if (!res) {
val_mv = data->raw;
res = adc_raw_to_millivolts_dt(&cfg->adc_channel, &val_mv);
data->sample_val = val_mv;