summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-28 15:50:45 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-28 15:50:45 +0100
commit12f457dd78900dbdf9431330d0c1abc040e03dbe (patch)
tree5e5e2fd28aed189dc3494148e4a06e0dca258952 /drivers/regulator
parentMerge remote-tracking branch 'regulator/for-linus' into regulator-next (diff)
parentregulator: fix use after free bug (diff)
downloadlinux-12f457dd78900dbdf9431330d0c1abc040e03dbe.tar.xz
linux-12f457dd78900dbdf9431330d0c1abc040e03dbe.zip
Merge remote-tracking branch 'regulator/for-linus' into regulator-next
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f489bed2d848..ca2efca00734 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2856,8 +2856,8 @@ void regulator_unregister(struct regulator_dev *rdev)
list_del(&rdev->list);
if (rdev->supply)
regulator_put(rdev->supply);
- device_unregister(&rdev->dev);
kfree(rdev->constraints);
+ device_unregister(&rdev->dev);
mutex_unlock(&regulator_list_mutex);
}
EXPORT_SYMBOL_GPL(regulator_unregister);