On Mon, Nov 14, 2016 at 03:34:54PM +0100, Johan Hovold wrote:
> On Fri, Nov 11, 2016 at 11:28:52AM -0800, Tony Lindgren wrote:
> > If we return early on pm_runtime_get() error, we need to also call
> > pm_runtime_put_noidle() as pointed out in a musb related thread
> > by Johan Hovold <[email protected]>. This is to keep the PM runtime
> > use counts happy.
> >
> > Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support")
> > Cc: Johan Hovold <[email protected]>
> > Signed-off-by: Tony Lindgren <[email protected]>
> > ---
> > drivers/dma/cppi41.c | 11 +++++++++--
> > 1 file changed, 9 insertions(+), 2 deletions(-)
>
> > @@ -466,6 +472,7 @@ static void cppi41_dma_issue_pending(struct dma_chan
> > *chan)
> >
> > error = pm_runtime_get(cdd->ddev.dev);
> > if ((error != -EINPROGRESS) && error < 0) {
> > + pm_runtime_put_noidle(cdd->ddev.dev);
> > dev_err(cdd->ddev.dev, "Failed to pm_runtime_get: %i\n",
> > error);
>
> Will this chunk not introduce rather than fix an imbalance, though? An
> error is never returned above, and the corresponding put is done
> unconditionally as far as I can tell.
Ah, that's no longer an issue after
"dma: cppi41: Fix unpaired pm runtime when only a USB hub is
connected"
from last week.
Sorry for the noise.
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html