Skip to content

Commit a577f34

Browse files
osctobebroonie
authored andcommitted
regulator: remove superfluous lock in regulator_resolve_coupling()
The code modifies rdev, but locks c_rdev instead. Remove the lock as this is held together by regulator_list_mutex taken in the caller. Fixes: f950338 ("regulator: core: Mutually resolve regulators coupling") Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/25eb81cefb37a646f3e44eaaf1d8ae8881cfde52.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 2dbf085 commit a577f34

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/regulator/core.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4972,13 +4972,9 @@ static void regulator_resolve_coupling(struct regulator_dev *rdev)
49724972
return;
49734973
}
49744974

4975-
regulator_lock(c_rdev);
4976-
49774975
c_desc->coupled_rdevs[i] = c_rdev;
49784976
c_desc->n_resolved++;
49794977

4980-
regulator_unlock(c_rdev);
4981-
49824978
regulator_resolve_coupling(c_rdev);
49834979
}
49844980
}

0 commit comments

Comments
 (0)