[PATCH 03/10] pmdomain: samsung: use to devm_kstrdup_const() to simplify error handling
André Draszik
andre.draszik at linaro.org
Thu Oct 9 22:29:01 PDT 2025
On Fri, 2025-10-10 at 02:35 +0200, Krzysztof Kozlowski wrote:
> On 09/10/2025 23:00, André Draszik wrote:
> > On Thu, 2025-10-09 at 14:31 +0100, André Draszik wrote:
> > > On Thu, 2025-10-09 at 09:13 +0900, Krzysztof Kozlowski wrote:
> > > > On 07/10/2025 01:43, André Draszik wrote:
> > > > > Convert to using devm_kstrdup_const() so as to simplify cleanup during
> > > > > error handling.
> > > >
> > > >
> > > > This is either a fix (then describe the fixed issue and add Fixed tag)
> > > > or you change the logic, not only simplify.
> > > >
> > > > Previously on of_genpd_add_provider_simple() the memory was not
> > > > kfree_const. Now it will be.
> > >
> > > Indeed it's a fix after all - While the driver doesn't allow unbind,
> >
> > Thinking more about it - at this stage, this patch is not a fix. The driver
> > can not unbind, hence there is no leak to be plugged, hence no fix.
>
> It is about error paths. Driver can fail binding.
Thank you Krzysztof for your patience. Yes, I had overlooked that
of_genpd_add_provider_simple() itself can fail. Sorry for
the noise.
Cheers,
Andre'
More information about the linux-arm-kernel
mailing list