Re: [PATCH] iio: proximity: srf04: fix runtime PM autosuspend cleanup

Johan Hovold <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Fri, Aug 07, 2026 at 05:02:32PM +0200, Joshua Crofts wrote:
> On Fri, 7 Aug 2026 at 16:46, Guangshuo Li <[email protected]> wrote:
> >
> > srf04_probe() calls pm_runtime_use_autosuspend() when the optional
> > power GPIO is present, but srf04_remove() does not call the matching
> > pm_runtime_dont_use_autosuspend() before disabling runtime PM.
> >
> > The runtime PM documentation requires pm_runtime_use_autosuspend() to
> > be balanced with pm_runtime_dont_use_autosuspend() when the driver is
> > removed. Failing to do so can leave the autosuspend usage state
> > unbalanced and may result in a usage_count leak when the autosuspend
> > delay is negative.
> >
> > Add the missing pm_runtime_dont_use_autosuspend() call in the remove
> > path before disabling runtime PM.
> >
> > This issue was found by manual code inspection.
> >
> > Fixes: 2251157b335b4 ("iio: srf04: add power management feature")
> > Signed-off-by: Guangshuo Li <[email protected]>
> > ---
> 
> Since this has a Fixes: tag it should also be marked for stable.

I stumbled over this comment when looking into why these were marked for
backporting (which I don't think they should be).

And no, having a Fixes tag does not imply that you should CC stable.

A Fixes tag indicates which commit introduced a bug, but that in itself
does not imply that the fix meets the stable backport criteria.

Johan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.