From 139cdfc24364b5752d41392a69638c5ab16765e8 Mon Sep 17 00:00:00 2001 From: sudarsan N Date: Fri, 13 Jun 2025 12:39:54 +0530 Subject: [PATCH] drivers: uc81xx: fix unchecked return from mipi_dbi_reset() Check return value to handle potential failure. Fixes: CID 524752 Signed-off-by: sudarsan N --- drivers/display/uc81xx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/display/uc81xx.c b/drivers/display/uc81xx.c index 11a89c3475a..e7e8326ca90 100644 --- a/drivers/display/uc81xx.c +++ b/drivers/display/uc81xx.c @@ -517,7 +517,10 @@ static int uc81xx_controller_init(const struct device *dev) const struct uc81xx_config *config = dev->config; struct uc81xx_data *data = dev->data; - mipi_dbi_reset(config->mipi_dev, UC81XX_RESET_DELAY); + if (mipi_dbi_reset(config->mipi_dev, UC81XX_RESET_DELAY) < 0) { + return -EIO; + } + k_sleep(K_MSEC(UC81XX_RESET_DELAY)); uc81xx_busy_wait(dev);