[PATCH] clocksource/drivers/owl: fix refcount leak
Alexander A. Klimov
grandmaster at al2klimov.de
Fri May 22 11:20:49 PDT 2026
On 5/21/26 14:10, Markus Elfring wrote:
>> Every value returned from of_clk_get() is supposed to be cleaned up
>> via clk_put() once not needed anymore.
>
> How do you think about to add a wording like “Thus add a missing function call.”?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.1-rc4#n94
>
> Would the application of another guard become helpful?
TIL (from you) there's DEFINE_FREE.
This seems pretty cool on its own.
I think I can apply it here, but I'd have to recompile.
This takes long.
Or we just fix this leak with the oneliner
I already compiled, booted and submitted.
I'll wait what maintainers decide...
>
> How will chances evolve to adjust variable scopes accordingly?
Is this even a thing in Linux?
I mean specifying C variables anywhere ex. at function begin.
More information about the linux-arm-kernel
mailing list