Re: [RFC/RFT PATCH] PM: sleep: Ignore device driver suspend() callback return values

From: Len Brown
Date: Thu Dec 05 2024 - 12:24:47 EST


On Thu, Dec 5, 2024 at 10:09 AM Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

> > IMV, drivers returning errors from their suspend callbacks without a
> > sufficiently serious reason are kind of a problem.
>
> There is a least one driver whose suspend callback returns an error if
> the device is enabled for wakeup and a wakeup event occurs during the
> suspend procedure. We don't want to ignore those races.

That driver should invoke pm_system_wakeup() on that wakeup event, right?

Len Brown, Intel Open Source Technology Center