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:
parent
879c611f58
commit
97e15f2923
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue