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:
parent
df0db6a7a3
commit
139cdfc243
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue