lkml.org 
[lkml]   [2020]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 4/8] drivers: thermal: tsens: Release device in success path
On Thu, Feb 20, 2020 at 4:25 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> Quoting Amit Kucheria (2020-02-18 10:12:08)
> > We don't currently call put_device in case of successfully initialising
> > the device.
>
> Sure, but why is that a problem? Presumably the device is kept pinned
> forever?

Right, we keep the reference forever. Will fix the commit message.
>
> >
> > Allow control to fall through so we can use same code for success and
> > error paths to put_device.
> >
> > As a part of this fixup, change devm_ioremap_resource to act on the same
> > device pointer as that used to allocate regmap memory. That ensures that
> > we are free to release op->dev after examining its resources.
> >
> > Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

\
 
 \ /
  Last update: 2020-02-24 10:22    [W:0.071 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site