video: tegra: host: Fix bounds-checking

The length of the mod_locks array is NV_HOST1X_NB_MLOCKS, not
NV_HOST1X_SYNCPT_NB_PTS.

Change-Id: Ibce054bb8a168f2b83646745f2b62cd282b8ff9d
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Acked-by: Erik Gilling <konkers@android.com>
This commit is contained in:
Robert Morell
2010-11-19 19:17:36 -08:00
committed by Erik Gilling
parent d340f9224d
commit d6f7633ef2

View File

@@ -452,7 +452,7 @@ static int nvhost_ioctl_ctrl_module_mutex(
struct nvhost_ctrl_module_mutex_args *args)
{
int err = 0;
if (args->id >= NV_HOST1X_SYNCPT_NB_PTS ||
if (args->id >= NV_HOST1X_NB_MLOCKS ||
args->lock > 1)
return -EINVAL;