summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorJasmin Jessich <jasmin@anw.at>2018-07-28 09:54:49 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-07 05:56:57 -0400
commit4effa8bfe4f6bacd041f98775f49cdc550502dc2 (patch)
treed07e68aa9d1ef7783df0e52f052e013c169da074 /drivers/media
parent132f3c7bb98673f713be9511de16b7622803df36 (diff)
media: i2c: fix warning in Aptina MT9V111
This fixes the "'idx' may be used uninitialized in this function" warning: drivers/media/i2c/mt9v111.c: In function 'mt9v111_set_format': drivers/media/i2c/mt9v111.c:887:15: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized] unsigned int idx; ^~~ Signed-off-by: Jasmin Jessich <jasmin@anw.at> Acked-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/mt9v111.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index da8f6ab91307..58d5f2224bff 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -884,7 +884,7 @@ static int mt9v111_set_format(struct v4l2_subdev *subdev,
struct v4l2_mbus_framefmt new_fmt;
struct v4l2_mbus_framefmt *__fmt;
unsigned int best_fit = ~0L;
- unsigned int idx;
+ unsigned int idx = 0;
unsigned int i;
mutex_lock(&mt9v111->stream_mutex);