Re: [PATCH] iio: light: gp2ap002: Disable regulators on resume failure
From: Jonathan Cameron
Date: Sat Jul 11 2026 - 18:46:37 EST
On Fri, 10 Jul 2026 19:40:50 +0200
Linus Walleij <linusw@xxxxxxxxxx> wrote:
> On Sat, Jul 4, 2026 at 10:34 AM Laxman Acharya Padhya
> <acharyalaxman8848@xxxxxxxxx> wrote:
>
> > If enabling VIO fails after VDD has been enabled, runtime resume
> > returns without disabling VDD. Likewise, if device reinitialization
> > fails, both supplies remain enabled. The runtime PM core keeps the
> > device suspended when its resume callback fails, so the supplies must
> > be restored to the suspended state.
> >
> > Disable the supplies enabled by the callback before returning an error.
> >
> > Fixes: 97d642e23037 ("iio: light: Add a driver for Sharp GP2AP002x00F")
> > Assisted-by: Codex:gpt-5
> > Signed-off-by: Laxman Acharya Padhya <acharyalaxman8848@xxxxxxxxx>
>
> Looks right.
> Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Applied, and marked for stable.
Jonathan
>
> Yours,
> Linus Walleij