Re: [PATCH] gpio: omap: do not unprepare the debounce clock twice on probe failure

From: Bartosz Golaszewski

Date: Tue Nov 24 2026 - 07:48:15 EST


On Tue, Nov 24, 2026 at 03:52:31PM +0700, Cong Nguyen wrote:
> The debounce clock is now obtained with devm_clk_get_prepared(), so
> devres unprepares it when probe fails or the device is unbound. The error
> path added for a failing pm_runtime_resume_and_get() still calls
> clk_unprepare() on the same clock by hand.
>
> When pm_runtime_resume_and_get() fails and a debounce clock is present,
> the clock is unprepared twice. The second clk_unprepare() warns that the
> clock is already unprepared.
>
> Drop the manual clk_unprepare().
>
> This issue was found by auditing the driver with an LLM coding assistant.
>

I queued it but don't add things like this in the commit message. I
don't care who found the issue and the consensus is the wider kernel
community should not care either.

Bart