Re: [PATCH] clocksource/drivers/owl: fix refcount leak

From: Alexander A. Klimov

Date: Fri May 22 2026 - 14:29:41 EST




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.