Re: 回复: [RFC PATCH 3/4] regulator: rts490x: Add driver for on-die regulators

Krzysztof Kozlowski krzk at kernel.org
Mon Sep 21 07:07:02 PDT 2026


On 21/09/2026 05:46, 周寅 wrote:
> On Sun, Sep 20, 2026, Krzysztof Kozlowski wrote:
>> You leak OF nodes.
> 
> Thanks for the review.
> 
> Both regulators and node are declared with __free(device_node), so the
> references returned by of_get_available_child_by_name() should be
> dropped on scope exit, including the continue and error paths.
> 
> Could you clarify which reference is leaking?

I missed the __free, but then why do you declare __free variable with
NULL as constructor? Don't grow this pattern. See cleanup.h (or
discussions on the lists).

Best regards,
Krzysztof



More information about the linux-i3c mailing list