summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/media/atomisp/i2c/atomisp-ov2680.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
index 497884d332e1..d24f8830fd94 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
@@ -869,11 +869,11 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
dev_err(&client->dev,
"ov2680 write resolution register err: %d\n", ret);
+ vts = dev->res->lines_per_frame;
+
/* If necessary increase the VTS to match exposure + MARGIN */
if (dev->exposure > vts - OV2680_INTEGRATION_TIME_MARGIN)
vts = dev->exposure + OV2680_INTEGRATION_TIME_MARGIN;
- else
- vts = dev->res->lines_per_frame;
ret = ov2680_write_reg(client, 2, OV2680_TIMING_VTS_H, vts);
if (ret)