Re: [Linux-stm32] [PATCH] rtc: stm32: fix clock leak on pinctrl probe failure
From: Antonio Borneo
Date: Wed Sep 16 2026 - 03:55:58 EST
On Mon, 2026-09-14 at 20:29 +0700, Cong Nguyen wrote:
> stm32_rtc_probe() enables rtc_ck/pclk early and unwinds them through
> the err: label on every later failure -- except a failing
> devm_pinctrl_register_and_init() or pinctrl_enable(), which both
> return directly, leaking both clocks. -EPROBE_DEFER is a routine
> outcome from pinctrl lookups during boot, so each deferred retry
> leaks another reference.
>
> Route both through the existing err: label, matching every other
> post-enable failure path in this function.
>
> Fixes: 16ad2bc09efb ("rtc: stm32: add pinctrl and pinmux interfaces")
> Assisted-by: Claude:claude-opus-4
Shouldn't it be
Assisted-by: LLM
accordingly to commit 816d9992d9ed in latest
Documentation/process/coding-assistants.rst ?
> Signed-off-by: Cong Nguyen <congnt264@xxxxxxxxx>
> ---
Apart from the comment above,
Reviewed-by: Antonio Borneo <antonio.borneo@xxxxxxxxxxx>
Thanks!
Antonio