From 3dfca6a74f9282d8bc49668c627183a0ef9f2054 Mon Sep 17 00:00:00 2001 From: Tarang Raval Date: Sun, 10 Nov 2024 16:04:42 +0530 Subject: [PATCH] Revert "drivers: sensor: ina219: remove redundant error check" This reverts commit dcf546e5e387f66a053ba0a9319c4f6c1ec38eaf. --- drivers/sensor/ti/ina219/ina219.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/sensor/ti/ina219/ina219.c b/drivers/sensor/ti/ina219/ina219.c index 2560d879b8cf16..cebe0dc812a339 100644 --- a/drivers/sensor/ti/ina219/ina219.c +++ b/drivers/sensor/ti/ina219/ina219.c @@ -269,7 +269,11 @@ static int ina219_init(const struct device *dev) } /* Set measurement delay */ - ina219_set_msr_delay(dev); + rc = ina219_set_msr_delay(dev); + if (rc) { + LOG_ERR("Could not get measurement delay."); + return rc; + } k_sleep(K_USEC(INA219_WAIT_STARTUP));