[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zs921Yj-lqg54wZs@smile.fi.intel.com>
Date: Wed, 28 Aug 2024 22:13:25 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Stephen Boyd <sboyd@...nel.org>
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
Michael Turquette <mturquette@...libre.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Subject: Re: [PATCH v1 1/1] clk: devres: Simplify devres handling functions
On Wed, Aug 28, 2024 at 11:39:51AM -0700, Stephen Boyd wrote:
> Quoting Andy Shevchenko (2024-08-28 06:08:20)
> > On Tue, Aug 27, 2024 at 05:19:04PM -0700, Stephen Boyd wrote:
> > > Quoting Andy Shevchenko (2024-08-22 08:58:22)
...
> > > > - state = devres_alloc(devm_clk_release, sizeof(*state), GFP_KERNEL);
> > > > + state = devm_kmalloc(dev, sizeof(*state), GFP_KERNEL);
> > >
> > > When is this allocation freed if the get() fails? When the calling
> > > device driver detaches?
> >
> > At device unbinding. Is it a problem?
>
> It is a change, and the commit text said no functional change :(
Ah, I see. I think it's possible to actually make it happen that there will be
no dangling memory in case of failure. I'll think about that.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists