Skip to content

Commit

Permalink
drivers: gpio: add missing check if GPIO is ready for BD8LB600FS
Browse files Browse the repository at this point in the history
Add a missing call to gpio_is_ready_dt in the driver of
the BD8LB600FS.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
  • Loading branch information
benediktibk authored and nashif committed Jan 25, 2024
1 parent 7b55b99 commit 5a61805
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpio/gpio_bd8lb600fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ static int bd8lb600fs_init(const struct device *dev)
return -ENODEV;
}

if (!gpio_is_ready_dt(&config->gpio_reset)) {
LOG_ERR("%s: reset GPIO is not ready", dev->name);
return -ENODEV;
}

int result = k_mutex_init(&drv_data->lock);

if (result != 0) {
Expand Down

0 comments on commit 5a61805

Please sign in to comment.