lkml.org 
[lkml]   [2013]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH V2 07/18] regulator: lp3971: use devm_regulator_register()
Date
On Thursday, September 26, 2013 11:08 AM, Jingoo Han wrote:
>
> Use devm_regulator_register() to make cleanup paths simpler.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> drivers/regulator/lp3971.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>

[....]

> @@ -463,10 +462,6 @@ static int lp3971_i2c_probe(struct i2c_client *i2c,
> static int lp3971_i2c_remove(struct i2c_client *i2c)
> {
> struct lp3971 *lp3971 = i2c_get_clientdata(i2c);
> - int i;
> -
> - for (i = 0; i < lp3971->num_regulators; i++)
> - regulator_unregister(lp3971->rdev[i]);
>
> kfree(lp3971->rdev);

CC'ed Sachin Kamat,

Calling regulator_unregister(lp3971->rdev) after kfree(lp3971->rdev)
would make the problem.
I will remove this patch from next v3 patch series.

Best regards,
Jingoo Han




\
 
 \ /
  Last update: 2013-09-26 09:01    [W:1.140 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site