regulator: core: Avoid deadlock when regulator_register fails
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Wed, 14 Nov 2012 09:39:31 +0000 (09:39 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 14 Nov 2012 10:01:15 +0000 (19:01 +0900)
When regulator_register fails and exits through the scrub path the
regulator_put function was called whilst holding the
regulator_list_mutex, causing deadlock.

This patch adds a private version of the regulator_put function which
can be safely called whilst holding the mutex, replacing the
aforementioned call.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

No differences found