Re: 回复: [RFC PATCH 3/4] regulator: rts490x: Add driver for on-die regulators
From: Krzysztof Kozlowski
Date: Mon Sep 21 2026 - 10:16:49 EST
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