summaryrefslogtreecommitdiff
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2020-08-12 04:31:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-17 14:55:25 +0300
commit1dc746dfc129ac62df219ca95ebc5b0296d68da4 (patch)
tree3fac1ae05710fb8cddebae655831004b1dab53f9 /drivers/regulator/core.c
parent8dc8bed9be37ca33556a0606695956398621409d (diff)
downloadlinux-1dc746dfc129ac62df219ca95ebc5b0296d68da4.tar.xz
regulator: remove superfluous lock in regulator_resolve_coupling()
[ Upstream commit a577f3456c0a2fac3dee037c483753e6e68f3e49 ] 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: f9503385b187 ("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>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 86107d2e1733..0ba5ca7082af 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -4891,13 +4891,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);
}
}