summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2012-11-23 13:51:59 +0530
committerMatthew Pedro <mapedro@nvidia.com>2013-08-19 11:25:41 -0700
commit6b1f8183c6652ad9f93b4cd5dae1d08fbdac50bc (patch)
treeb9a26d4ca75dd5bf94ffc46ab96bc6e0c27495db
parent7892df38fdc1c535e625f93c1fef47709e735c68 (diff)
media: video: tegra: sh532u: fix out-of-bounds read
fix Coverity issue Coverity id : 13692 Bug 1046331 Bug 1049868 Change-Id: Iefa6d076d4622368534710630b89b9a15d166378 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/165864 (cherry picked from commit db33c3f3f2447a52a40f4fd001fec9a2932ee4c8) Reviewed-on: http://git-master/r/244637 Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com> Tested-by: Shreshtha Sahu <ssahu@nvidia.com> Reviewed-by: Kiran Adduri <kadduri@nvidia.com> Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
-rw-r--r--drivers/media/video/tegra/sh532u.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/tegra/sh532u.c b/drivers/media/video/tegra/sh532u.c
index e41dd1f4afb1..b9f9b91d5a45 100644
--- a/drivers/media/video/tegra/sh532u.c
+++ b/drivers/media/video/tegra/sh532u.c
@@ -1,7 +1,7 @@
/*
* SH532U focuser driver.
*
- * Copyright (C) 2011-2012 NVIDIA Corporation.
+ * Copyright (C) 2011-2013 NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -386,7 +386,7 @@ static void sh532u_gpio_exit(struct sh532u_info *info)
{
unsigned i;
- for (i = 0; i <= ARRAY_SIZE(sh532u_gpios); i++) {
+ for (i = 0; i < ARRAY_SIZE(sh532u_gpios); i++) {
if (info->gpio[i].flag && info->gpio[i].own) {
gpio_free(info->gpio[i].gpio);
info->gpio[i].own = false;