Explorar o código

regulator: regulator disable supply fix

This patch fixes a disable failure when regulator supply is used.
A while loop in regulator disable checks for supply pointer != NULL
but the pointer is not always updated, resulting in the while loop
running too many times causing a disable failure.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mattias Wallin %!s(int64=14) %!d(string=hai) anos
pai
achega
b12a1e29af
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      drivers/regulator/core.c

+ 1 - 0
drivers/regulator/core.c

@@ -1359,6 +1359,7 @@ static int _regulator_disable(struct regulator_dev *rdev,
 		struct regulator_dev **supply_rdev_ptr)
 {
 	int ret = 0;
+	*supply_rdev_ptr = NULL;
 
 	if (WARN(rdev->use_count <= 0,
 			"unbalanced disables for %s\n",