Skip to content

Commit

Permalink
drivers: sensor: ina219: remove redundant error check
Browse files Browse the repository at this point in the history
The function ina219_set_msr_delay always returns zero, indicating success.
Therefore, the error check on its return value is unnecessary and can be removed.

Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
  • Loading branch information
Tarangraval21 committed Nov 10, 2024
1 parent 64a58fa commit dcf546e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/sensor/ti/ina219/ina219.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,7 @@ static int ina219_init(const struct device *dev)
}

/* Set measurement delay */
rc = ina219_set_msr_delay(dev);
if (rc) {
LOG_ERR("Could not get measurement delay.");
return rc;
}
ina219_set_msr_delay(dev);

k_sleep(K_USEC(INA219_WAIT_STARTUP));

Expand Down

0 comments on commit dcf546e

Please sign in to comment.