media: rockchip/cif: fix get subdev fmt null pointer

Change-Id: I19ff295566e374e5557b6c7407de853343e61286
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
Cai YiWei
2018-09-03 11:12:54 +08:00
committed by Tao Huang
parent a0fdf9ce3e
commit 87496cc185

View File

@@ -139,6 +139,7 @@ cif_input_fmt *get_input_fmt(struct v4l2_subdev *sd, struct v4l2_rect *rect)
int ret;
u32 i;
fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt);
if (ret < 0) {
v4l2_warn(sd->v4l2_dev,