4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mark Brown <broo...@kernel.org>

commit 49a6bb7a1c0963f260e4b0dcc2c0e56ec65a28b2 upstream.

The latest workaround for the lockdep interface's not using the second
argument of mutex_lock_nested() changed the loop missed locking the last
regulator due to a thinko with the loop termination condition exiting
one regulator too soon.

Reported-by: Tyler Baker <tyler.ba...@linaro.org>
Signed-off-by: Mark Brown <broo...@kernel.org>
Cc: Guenter Roeck <li...@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 drivers/regulator/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -141,7 +141,7 @@ static void regulator_lock_supply(struct
        int i;
 
        mutex_lock(&rdev->mutex);
-       for (i = 1; rdev->supply; rdev = rdev->supply->rdev, i++)
+       for (i = 1; rdev; rdev = rdev->supply->rdev, i++)
                mutex_lock_nested(&rdev->mutex, i);
 }
 


Reply via email to