regulator: remove superfluous lock in regulator_resolve_coupling()

[ Upstream commit a577f3456c ]

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: f9503385b1 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Michał Mirosław 2020-08-12 03:31:38 +02:00 committed by Greg Kroah-Hartman
parent 69163464bc
commit 2591559086
1 changed files with 0 additions and 4 deletions

View File

@ -4868,13 +4868,9 @@ static void regulator_resolve_coupling(struct regulator_dev *rdev)
return;
}
regulator_lock(c_rdev);
c_desc->coupled_rdevs[i] = c_rdev;
c_desc->n_resolved++;
regulator_unlock(c_rdev);
regulator_resolve_coupling(c_rdev);
}
}