Skip to content

Commit

Permalink
regulator: Fix double free in devm_regulator_put()
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jun 18, 2012
1 parent 8b96de3 commit 230a5a1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 230a5a1

Please sign in to comment.