Messages in this thread Patch in this message | | | From | Jingoo Han <> | Subject | Re: [PATCH V2 07/18] regulator: lp3971: use devm_regulator_register() | Date | Thu, 26 Sep 2013 15:36:02 +0900 |
| |
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
| |