From: Sakari Ailus Date: Sun, 16 Nov 2014 14:48:31 +0000 (-0300) Subject: [media] smiapp: Set left and top to zero for crop bounds selection X-Git-Tag: v3.19-rc1~126^2~32 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=21734b06430a935073ba11e3caa231cbf4fccb13;p=karo-tx-linux.git [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 --- diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 193af1c82d37..022ad44b5e6c 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 =