From 21734b06430a935073ba11e3caa231cbf4fccb13 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Sun, 16 Nov 2014 11:48:31 -0300 Subject: [PATCH] [media] smiapp: Set left and top to zero for crop bounds selection The fields were previously uninitialised, leaving the returned values to where the user had set them. This was never the intention. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/smiapp/smiapp-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 193af1c..022ad44 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2191,6 +2191,7 @@ static int __smiapp_get_selection(struct v4l2_subdev *subdev, switch (sel->target) { case V4L2_SEL_TGT_CROP_BOUNDS: if (ssd == sensor->pixel_array) { + sel->r.left = sel->r.top = 0; sel->r.width = sensor->limits[SMIAPP_LIMIT_X_ADDR_MAX] + 1; sel->r.height = -- 2.7.4