lkml.org 
[lkml]   [2013]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 09/20] regulator: lp3972: use devm_regulator_register()
From
On 25 September 2013 13:32, Jingoo Han <jg1.han@samsung.com> wrote:
> Use devm_regulator_register() to make cleanup paths simpler.

> static int lp3972_i2c_remove(struct i2c_client *i2c)
> {
> struct lp3972 *lp3972 = i2c_get_clientdata(i2c);
> - int i;
>
> - for (i = 0; i < lp3972->num_regulators; i++)
> - regulator_unregister(lp3972->rdev[i]);
> kfree(lp3972->rdev);

With devm the unregister would happen after the freeing of the device.
Wouldn't this re-ordering cause any
problems?

--
With warm regards,
Sachin


\
 
 \ /
  Last update: 2013-09-25 12:41    [W:0.213 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site