[media] smiapp: Set left and top to zero for crop bounds selection
authorSakari Ailus <[email protected]>
Sun, 16 Nov 2014 14:48:31 +0000 (11:48 -0300)
committerMauro Carvalho Chehab <[email protected]>
Thu, 4 Dec 2014 14:38:41 +0000 (12:38 -0200)
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 <[email protected]>
Acked-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/i2c/smiapp/smiapp-core.c

index 193af1c82d3788168b674996c67415dcc1825b61..022ad44b5e6cab86bc2611b2fe2a3837f9894324 100644 (file)
@@ -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 =