Re: [PATCH] HID: intel-thc-hid: intel-quicki2c: fix autosuspend cleanup during teardown
Jiri Kosina <[email protected]>
| Newsgroups | org.kernel.vger.linux-input,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 8 Aug 2026, Guangshuo Li wrote:
> quicki2c_probe() calls pm_runtime_use_autosuspend(), but
> quicki2c_remove() does not call the matching
> pm_runtime_dont_use_autosuspend() during teardown.
>
> If the autosuspend delay is set to a negative value while autosuspend
> is enabled, the runtime PM core increments usage_count to prevent
> runtime suspend. Without calling pm_runtime_dont_use_autosuspend()
> during teardown, this reference is not dropped.
>
> The documentation for pm_runtime_use_autosuspend() also notes that it
> is important to undo it with pm_runtime_dont_use_autosuspend() at
> driver exit time, unless runtime PM was initially enabled with
> devm_pm_runtime_enable().
>
> Add the missing pm_runtime_dont_use_autosuspend() call to the driver
> remove path.
>
> This issue was found by manual code inspection.
>
> Fixes: 5f420e8215c6 ("HID: intel-thc-hid: intel-quicki2c: Add PM implementation")
> Cc: [email protected]
> Signed-off-by: Guangshuo Li <[email protected]>
Applied, thanks.
--
Jiri Kosina
SUSE Labs