projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be1a50d
)
mc13783-regulator: fix a memory leak in mc13783_regulator_remove
author
Axel Lin
<
[email protected]
>
Mon, 19 Apr 2010 01:58:02 +0000
(09:58 +0800)
committer
Liam Girdwood
<
[email protected]
>
Mon, 19 Apr 2010 12:29:16 +0000
(13:29 +0100)
This patch fixes a memory leak by freeing priv in mc13783_regulator_remove
Signed-off-by: Axel Lin <
[email protected]
>
Cc: Sascha Hauer <
[email protected]
>
Cc: Liam Girdwood <
[email protected]
>
Cc: Mark Brown <
[email protected]
>
Cc: Samuel Ortiz <
[email protected]
>
Signed-off-by: Liam Girdwood <
[email protected]
>
drivers/regulator/mc13783-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/mc13783-regulator.c
b/drivers/regulator/mc13783-regulator.c
index a681f5e8f78602db461bb44d2e089367a4498476..ad036dd8da136852bd1490eff9c36807a1bfef0a 100644
(file)
--- 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;
}