Re: [PATCH 04/20] i2c: viai2c-wmt: Fix clock leak in wmt_i2c_probe()
From: Wentao Liang
Date: Wed Nov 04 2026 - 23:14:06 EST
Hi Alexey, Andi,
Sorry for leaving Alexey's review unanswered, and thank you for reviewing
and merging the fix. I am following up from wentao_liang_g@xxxxxxx because
I can no longer send mail from my original address, vulab@xxxxxxxxxxx.
> Maybe we could go for devm_clk_get_enabled and drop some more
> boilerplate which follows in wmt_i2c_reset_hardware, while at it?
Yes, that would allow a broader cleanup. The current reset helper calls
clk_prepare_enable() and disables the clock if clk_set_rate() fails.
There are also explicit clk_disable_unprepare() calls on adapter
registration failure and in remove(). Converting to
devm_clk_get_enabled() would need to update all of these together to
avoid double-disabling the clock and account for the resulting cleanup
ordering. The merged devm_clk_get() change only manages the clock
reference; it preserves the existing explicit enable/disable handling.
I agree that the broader cleanup belongs in a separate follow-up rather
than a v2 of the fix that has already been merged.
> Backporting this to stable seems like a stretch to me, though
I understand your concern about the backporting effort for a rarely
triggered leak in old code. The original stable Cc was for the missing
clk_put() on probe failure and driver removal, but I should have
addressed your concern at the time. This reply is not a request for any
additional backporting or for the broader cleanup to go to stable.
Andi, the 04/20 numbering came from a batch of independent fixes across
multiple subsystems, sent to their respective maintainers and lists.
This fix has no dependency on the other nineteen patches. That numbering
was confusing here; future independent fixes should be sent separately.
I used OpenAI Codex to help inspect the existing clock cleanup paths and
draft this reply. No new patch or hardware test results are submitted
with this message.
Thank you, and sorry again for the missed follow-up.
Best regards,
Wentao