Re: [PATCH] iio: adc: ti-ads1119: Fix unbalanced pm reference count in ds1119_single_conversion()

João Paulo Gonçalves
2026-02-28T19:22:53Z

Hello,

> Since pm_runtime_resume_and_get() automatically decrements the usage
> counter on failure, the subsequent call to pm_runtime_put_autosuspend()
> causes an unbalanced reference counter.

Reviewed-by: João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com>

Thanks for the fix!

The change looks correct to me, considering the auto-cleanup
implementation in pm_runtime. I need to take a proper look, but we
probably can get rid of the `pdown` label by using
PM_RUNTIME_ACQUIRE_IF_ENABLED_AUTOSUSPEND().

Att,
João Paulo