summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/video/tegra/host/nvhost_syncpt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/tegra/host/nvhost_syncpt.c b/drivers/video/tegra/host/nvhost_syncpt.c
index dc9f911ac90c..c99960381c63 100644
--- a/drivers/video/tegra/host/nvhost_syncpt.c
+++ b/drivers/video/tegra/host/nvhost_syncpt.c
@@ -247,7 +247,7 @@ static const char *s_syncpt_names[32] = {
const char *nvhost_syncpt_name(u32 id)
{
- BUG_ON(id > ARRAY_SIZE(s_syncpt_names));
+ BUG_ON(id >= ARRAY_SIZE(s_syncpt_names));
return s_syncpt_names[id];
}
@@ -299,7 +299,7 @@ int nvhost_syncpt_wait_check(struct nvmap_client *nvmap,
while (waitchks) {
u32 syncpt, override;
- BUG_ON(waitp->syncpt_id > NV_HOST1X_SYNCPT_NB_PTS);
+ BUG_ON(waitp->syncpt_id >= NV_HOST1X_SYNCPT_NB_PTS);
syncpt = atomic_read(&sp->min_val[waitp->syncpt_id]);
if (nvhost_syncpt_wrapping_comparison(syncpt, waitp->thresh)) {