]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: core: Fix locking of GPIO list on free
authorMark Brown <broonie@kernel.org>
Tue, 12 Apr 2016 07:05:43 +0000 (08:05 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 13 Apr 2016 06:43:00 +0000 (07:43 +0100)
commitb22064ee405e445bd2cdb851271908a10e791651
tree94214f415ad4d80a6de16846220532d584296cc5
parent34498ca3b3ae7eb9563ac1e8d36a181f3fa81df5
regulator: core: Fix locking of GPIO list on free

When we acquire a shareable enable GPIO on probe we do so with the
regulator_list_mutex held.  However when we release the GPIOs we do this
immediately after dropping the mutex meaning that the list could become
corrupted.  Move the release into the locked region to avoid this.

Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c