drivers: sensor: ina219: remove redundant error check

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>
This commit is contained in:
Tarang Raval 2024-11-12 11:06:12 +05:30 committed by Anas Nashif
parent b3f3bce23e
commit bb7319e7f2

View file

@ -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));