Skip to content

Commit dcf546e

Browse files
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 <[email protected]>
1 parent 64a58fa commit dcf546e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/sensor/ti/ina219/ina219.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,7 @@ static int ina219_init(const struct device *dev)
269269
}
270270

271271
/* Set measurement delay */
272-
rc = ina219_set_msr_delay(dev);
273-
if (rc) {
274-
LOG_ERR("Could not get measurement delay.");
275-
return rc;
276-
}
272+
ina219_set_msr_delay(dev);
277273

278274
k_sleep(K_USEC(INA219_WAIT_STARTUP));
279275

0 commit comments

Comments
 (0)