Skip to content

Commit 7119cc1

Browse files
finikorgcarlescufi
authored andcommitted
drivers: adc: adc_ads114s0x: Fix missing assignment
Fixes assignment before error check. Signed-off-by: Andrei Emeltchenko <[email protected]>
1 parent 1c70aeb commit 7119cc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/adc/adc_ads114s0x.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,8 @@ static int ads114s0x_send_start_read(const struct device *dev)
800800

801801
k_sleep(K_USEC(ADS114S0X_START_SYNC_PULSE_DURATION_IN_US +
802802
ADS114S0X_SETUP_TIME_IN_US));
803-
gpio_pin_set_dt(&config->gpio_start_sync, 0);
803+
804+
result = gpio_pin_set_dt(&config->gpio_start_sync, 0);
804805

805806
if (result != 0) {
806807
LOG_ERR("unable to start ADC operation");

0 commit comments

Comments
 (0)