Skip to content

Commit

Permalink
drivers: regulator: fixed warning during build in gpio regulator
Browse files Browse the repository at this point in the history
Backported from upstream patch 69c6732

Fix warning in gpio regulator:
    "declaration of 'ret' shadows a previous local".

Signed-off-by: Mykola Kvach <[email protected]>
  • Loading branch information
xakep-amatop authored and dsemenets committed Jun 26, 2024
1 parent cb85dfa commit a26be57
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/regulator/regulator_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ static int regulator_gpio_init(const struct device *dev)
regulator_common_data_init(dev);

for (unsigned int gpio_idx = 0; gpio_idx < cfg->num_gpios; gpio_idx++) {
int ret;

if (!gpio_is_ready_dt(&cfg->gpios[gpio_idx])) {
LOG_ERR("%s: gpio pin: %s not ready", dev->name,
cfg->gpios[gpio_idx].port ? cfg->gpios[gpio_idx].port->name
Expand Down

0 comments on commit a26be57

Please sign in to comment.