drivers: uc81xx: fix unchecked return from mipi_dbi_reset()

Check return value to handle potential failure.

Fixes: CID 524752

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
This commit is contained in:
sudarsan N 2025-06-13 12:39:54 +05:30 committed by Henrik Brix Andersen
commit 139cdfc243

View file

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