Re: [PATCH] iio: light: bh1780: fix PM runtime leak on error path
From: Linus Walleij
Date: Fri Jan 30 2026 - 08:17:13 EST
On Fri, Jan 30, 2026 at 12:31 PM Antoniu Miclaus
<antoniu.miclaus@xxxxxxxxxx> wrote:
> Move pm_runtime_put_autosuspend() before the error check to ensure
> the PM runtime reference count is always decremented after
> pm_runtime_get_sync(), regardless of whether the read operation
> succeeds or fails.
>
> Fixes: 1f0477f18306 ("iio: light: new driver for the ROHM BH1780")
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>
This looks right!
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Yours,
Linus Walleij