mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
regulator: Fix double free in devm_regulator_put()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
8b96de31b0
commit
230a5a1c41
1 changed files with 1 additions and 3 deletions
|
@ -1461,9 +1461,7 @@ void devm_regulator_put(struct regulator *regulator)
|
|||
|
||||
rc = devres_release(regulator->dev, devm_regulator_release,
|
||||
devm_regulator_match, regulator);
|
||||
if (rc == 0)
|
||||
regulator_put(regulator);
|
||||
else
|
||||
if (rc != 0)
|
||||
WARN_ON(rc);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_regulator_put);
|
||||
|
|
Loading…
Reference in a new issue