* [PATCH] regulator: max8660: Fix a memory leak due to missing devm_kzalloc conversion
@ 2012-04-17 10:06 Axel Lin
2012-04-17 13:44 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-04-17 10:06 UTC (permalink / raw)
To: linux-kernel; +Cc: Wolfram Sang, Liam Girdwood, Mark Brown
commit 4d26f7 "regulator: max8660: Use devm_kzalloc()" missed to
replace kzalloc by devm_kzalloc. Fix it.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/max8660.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
index 9997cfb..5d56817 100644
--- a/drivers/regulator/max8660.c
+++ b/drivers/regulator/max8660.c
@@ -370,7 +370,7 @@ static int __devinit max8660_probe(struct i2c_client *client,
return -EINVAL;
}
- max8660 = kzalloc(sizeof(struct max8660) +
+ max8660 = devm_kzalloc(&client->dev, sizeof(struct max8660) +
sizeof(struct regulator_dev *) * MAX8660_V_END,
GFP_KERNEL);
if (!max8660)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: max8660: Fix a memory leak due to missing devm_kzalloc conversion
2012-04-17 10:06 [PATCH] regulator: max8660: Fix a memory leak due to missing devm_kzalloc conversion Axel Lin
@ 2012-04-17 13:44 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-04-17 13:44 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Wolfram Sang, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
On Tue, Apr 17, 2012 at 06:06:50PM +0800, Axel Lin wrote:
> commit 4d26f7 "regulator: max8660: Use devm_kzalloc()" missed to
> replace kzalloc by devm_kzalloc. Fix it.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-17 13:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17 10:06 [PATCH] regulator: max8660: Fix a memory leak due to missing devm_kzalloc conversion Axel Lin
2012-04-17 13:44 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.