aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/ov7670.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c
index d7bfd30f74a9..5e0d4e2ee510 100644
--- a/drivers/media/video/ov7670.c
+++ b/drivers/media/video/ov7670.c
@@ -682,17 +682,17 @@ static int ov7670_try_fmt(struct i2c_client *c, struct v4l2_format *fmt,
682 for (index = 0; index < N_OV7670_FMTS; index++) 682 for (index = 0; index < N_OV7670_FMTS; index++)
683 if (ov7670_formats[index].pixelformat == pix->pixelformat) 683 if (ov7670_formats[index].pixelformat == pix->pixelformat)
684 break; 684 break;
685 if (index >= N_OV7670_FMTS) 685 if (index >= N_OV7670_FMTS) {
686 return -EINVAL; 686 /* default to first format */
687 index = 0;
688 pix->pixelformat = ov7670_formats[0].pixelformat;
689 }
687 if (ret_fmt != NULL) 690 if (ret_fmt != NULL)
688 *ret_fmt = ov7670_formats + index; 691 *ret_fmt = ov7670_formats + index;
689 /* 692 /*
690 * Fields: the OV devices claim to be progressive. 693 * Fields: the OV devices claim to be progressive.
691 */ 694 */
692 if (pix->field == V4L2_FIELD_ANY) 695 pix->field = V4L2_FIELD_NONE;
693 pix->field = V4L2_FIELD_NONE;
694 else if (pix->field != V4L2_FIELD_NONE)
695 return -EINVAL;
696 /* 696 /*
697 * Round requested image size down to the nearest 697 * Round requested image size down to the nearest
698 * we support, but not below the smallest. 698 * we support, but not below the smallest.