Message ID | 20170714104301.bbzd2xqgymhkwocr@valkosipuli.retiisi.org.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c index 909095ac90a2..7de80645dd6f 100644 --- a/drivers/media/i2c/ov5670.c +++ b/drivers/media/i2c/ov5670.c @@ -2060,7 +2060,8 @@ static int ov5670_init_controls(struct ov5670 *ov5670) &ov5670_ctrl_ops, V4L2_CID_LINK_FREQ, 0, 0, link_freq_menu_items); - ov5670->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; + if (ov5670->link_freq) + ov5670->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; /* By default, V4L2_CID_PIXEL_RATE is read only */ ov5670->pixel_rate = v4l2_ctrl_new_std(ctrl_hdlr, &ov5670_ctrl_ops,