Merge "drivers: mailbox: qti_tcs: fix incorrect check for TCS slot" into msm-4.9
diff --git a/drivers/mailbox/qti-tcs.c b/drivers/mailbox/qti-tcs.c
index c70af2b2..0a802fd 100644
--- a/drivers/mailbox/qti-tcs.c
+++ b/drivers/mailbox/qti-tcs.c
@@ -604,7 +604,7 @@
 			slot = m * tcs->ncpt;
 			break;
 		}
-		if (++m > tcs->num_tcs)
+		if (++m >= tcs->num_tcs)
 			m = 0;
 		cpu_relax();
 	} while (1);