lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: Re: [PATCH] iio: magnetometer: ak8974: Fix runtime PM imbalance on error
> What about just moving the pm_runtime_put() until the end
> of the initialization? Right before return 0;
> Then we can keep this nice goto exits as they are.
>
> Maybe move all these three:
>
> pm_runtime_set_autosuspend_delay(&i2c->dev,
> AK8974_AUTOSUSPEND_DELAY);
> pm_runtime_use_autosuspend(&i2c->dev);
> pm_runtime_put(&i2c->dev);
>

Good idea! Thank you for your advice and I will fix this
in the next version of patch.

Regards,
Dinghao
\
 
 \ /
  Last update: 2020-05-26 12:06    [W:0.039 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site