summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-21 21:31:52 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-21 21:31:52 +0200
commit458f8c895beba63851281dcdac3773685f0fae09 (patch)
treedd5b7af8b221bc5755e8ce94b7145f6f0589cac4 /drivers
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs (diff)
parentmc13783-regulator: fix a memory leak in mc13783_regulator_remove (diff)
downloadlinux-458f8c895beba63851281dcdac3773685f0fae09.tar.xz
linux-458f8c895beba63851281dcdac3773685f0fae09.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: mc13783-regulator: fix a memory leak in mc13783_regulator_remove regulator: Let drivers know when they use the stub API
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/mc13783-regulator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index a681f5e8f786..ad036dd8da13 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -618,9 +618,12 @@ static int __devexit mc13783_regulator_remove(struct platform_device *pdev)
dev_get_platdata(&pdev->dev);
int i;
+ platform_set_drvdata(pdev, NULL);
+
for (i = 0; i < pdata->num_regulators; i++)
regulator_unregister(priv->regulators[i]);
+ kfree(priv);
return 0;
}