Re: [PATCH] Input: s6sy761 - fix error handling in power management paths
From: Dmitry Torokhov
Date: Wed Sep 30 2026 - 13:08:06 EST
On Wed, Sep 30, 2026 at 06:15:29PM +0200, David Heidelberg wrote:
> On 30/09/2026 07:18, Dmitry Torokhov wrote:
> > In s6sy761_power_on(), if any of the I2C operations or status checks
> > fail after enabling the regulators, the function returns an error while
> > leaving the regulators enabled. Conversely, in s6sy761_resume(), if
> > powering on the controller fails, enable_irq() is skipped while the PM
> > core still marks the device as resumed. A subsequent system suspend or
> > driver unbind then invokes s6sy761_power_off() again, attempting to
> > disable already disabled regulators and incrementing the IRQ disable
> > depth a second time, which leaves the interrupt permanently disabled on
> > later resumes. Additionally, if restoring sensing in s6sy761_resume()
> > fails, the controller is left powered on.
> >
> > Track whether the controller is powered up with a powered_up flag,
> > unwind regulator enablement on error in s6sy761_power_on(), move
> > disable_irq() to s6sy761_suspend() so it is only called during system
> > sleep when the controller is powered up, and power off the controller
> > if restoring sensing fails during resume.
> >
> > Reported-by: sashiko-bot@xxxxxxxxxx
> > Assisted-by: LLM
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> > ---
> > drivers/input/touchscreen/s6sy761.c | 59 +++++++++++++++++++++--------
> > 1 file changed, 43 insertions(+), 16 deletions(-)
> >
>
> +<<<<<<< HEAD
> return s6sy761_power_on(sdata);
> +=======
> + return 0;
> +
> +err_power_off:
> + s6sy761_power_off(sdata);
> + return err;
> +>>>>>>> Input: s6sy761 - fix error handling in power management paths
>
> doesn't apply cleanly on linux-next, against which branch was it build? (I
> don't see anything touch it in input)
It's on top of your change, I just pushed my queue out, should be in
next next.
Thanks.
--
Dmitry