From b12a1e29af595d05612153bcb85258193bbf9382 Mon Sep 17 00:00:00 2001 From: Mattias Wallin Date: Tue, 2 Nov 2010 14:55:34 +0100 Subject: [PATCH] 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 Acked-by: Linus Walleij Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index f1d10c974cd..c6256332296 100644 --- a/drivers/regulator/core.c +++ b/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", -- 2.46.0