From: Mattias Wallin Date: Tue, 2 Nov 2010 13:55:34 +0000 (+0100) Subject: regulator: regulator disable supply fix X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b12a1e29af595d05612153bcb85258193bbf9382;p=linux-beck.git 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 --- diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index f1d10c974cd4..c62563322969 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",