lkml.org 
[lkml]   [2012]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] regulator: max8660: Fix a memory leak due to missing devm_kzalloc conversion
From
Date
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




\
 
 \ /
  Last update: 2012-04-17 12:09    [W:0.027 / U:1.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site