Commit 679c038f authored by Markus Pargmann's avatar Markus Pargmann Committed by Mark Brown

regulator: tps65090: Fix gpio initialization

The config is used for multiple regulators within a for loop. The config
field is not cleared before it is used for the next item. To avoid any
issues this patch adds a proper initialization for the config->ena_gpio
field in case no gpio is available.
Signed-off-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2454f8d1
...@@ -314,6 +314,9 @@ static void tps65090_configure_regulator_config( ...@@ -314,6 +314,9 @@ static void tps65090_configure_regulator_config(
config->ena_gpio = tps_pdata->gpio; config->ena_gpio = tps_pdata->gpio;
config->ena_gpio_initialized = true; config->ena_gpio_initialized = true;
config->ena_gpio_flags = gpio_flag; config->ena_gpio_flags = gpio_flag;
} else {
config->ena_gpio = -EINVAL;
config->ena_gpio_initialized = false;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment