Message ID | 3399746.xt7N4lig0U@wuerfel |
---|---|
State | New |
Headers | show |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c9bdca5f3b9b..89e4dcb84758 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -140,7 +140,8 @@ static void regulator_lock_supply(struct regulator_dev *rdev) { int i; - for (i = 0; rdev->supply; rdev = rdev->supply->rdev, i++) + mutex_lock(&rdev->mutex); + for (i = 1; rdev->supply; rdev = rdev->supply->rdev, i++) mutex_lock_nested(&rdev->mutex, i); }