[2/2] dmaengine: cppi41: Ignore EINPROGRESS for PM runtime in interrupt handler

Message ID 20170104160301.22406-3-abailon@baylibre.com
State New
Headers show

Commit Message

Alexandre Bailon Jan. 4, 2017, 4:03 p.m.
We can occasionally get -EINPROGRESS for pm_runtime_get.
This is happening when an interrupt is fired before PM runtime had time
to update the PM state to RESUMED.
In that case, don't print any error.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>

 drivers/dma/cppi41.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
index dfc880a..e4bee1c 100644
--- a/drivers/dma/cppi41.c
+++ b/drivers/dma/cppi41.c
@@ -351,7 +351,7 @@  static irqreturn_t cppi41_irq(struct cppi41_dd *cdd)
 			int error;
 			error = pm_runtime_get(cdd->ddev.dev);
-			if (error < 0)
+			if ((error != -EINPROGRESS) && error < 0)
 				dev_err(cdd->ddev.dev, "%s pm runtime get: %i\n",
 					__func__, error);