From 364364a180ee0eac2073c9e3d2541ebb22cc2800 Mon Sep 17 00:00:00 2001 From: Jubeom Kim Date: Thu, 23 Jun 2011 12:19:27 +0900 Subject: tegra: host: fix the compare statement. Change-Id: I8af3d087b361b91c17ed7a8035670f7041f5544b Reviewed-on: http://git-master/r/37983 Tested-by: Jubeom Kim Reviewed-by: Bharat Nihalani --- drivers/video/tegra/host/nvhost_syncpt.c | 4 ++-- 1 file 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)) { -- cgit v1.2.3