mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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: Markus Pargmann <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
2454f8d15c
commit
679c038f54
1 changed files with 3 additions and 0 deletions
|
|
@ -314,6 +314,9 @@ static void tps65090_configure_regulator_config(
|
|||
config->ena_gpio = tps_pdata->gpio;
|
||||
config->ena_gpio_initialized = true;
|
||||
config->ena_gpio_flags = gpio_flag;
|
||||
} else {
|
||||
config->ena_gpio = -EINVAL;
|
||||
config->ena_gpio_initialized = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue