Re: [PATCH] pwm: lp3943: Use of_property_count_u32_elems() to get property length
From: Uwe Kleine-König
Date: Thu Aug 01 2024 - 04:58:38 EST
Hello Rob,
On Wed, Jul 31, 2024 at 02:14:03PM -0600, Rob Herring (Arm) wrote:
> Replace of_get_property() with the type specific
> of_property_count_u32_elems() to get the property length.
>
> This is part of a larger effort to remove callers of of_get_property()
> and similar functions. of_get_property() leaks the DT property data
> pointer which is a problem for dynamically allocated nodes which may
> be freed.
To understand that right: The problem is that of_get_property() returns
pp->value, which might be freed. In this driver this isn't problematic
as the returned value is just used for a NULL check. So this isn't
urgent and queuing it for the next merge window is fine, right?
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature