Merge "mmc: cmdq_hci: fix platform device power management reference counting" into msm-4.9
diff --git a/drivers/mmc/host/cmdq_hci.c b/drivers/mmc/host/cmdq_hci.c
index cbc0e57..6c1536e 100644
--- a/drivers/mmc/host/cmdq_hci.c
+++ b/drivers/mmc/host/cmdq_hci.c
@@ -619,7 +619,6 @@
 	cmdq_writel(cq_host, 1 << tag, CQTDBR);
 
 out:
-	cmdq_runtime_pm_put(cq_host);
 	return err;
 }
 
@@ -635,6 +634,8 @@
 	if (mrq->cmdq_req->cmdq_req_flags & DCMD)
 		cmdq_writel(cq_host, cmdq_readl(cq_host, CQ_VENDOR_CFG) |
 			    CMDQ_SEND_STATUS_TRIGGER, CQCTL);
+
+	cmdq_runtime_pm_put(cq_host);
 	mrq->done(mrq);
 }