Commit b201533c authored by Enrico Scholz's avatar Enrico Scholz

media:mx6s_capture: fixed NULL pointer access

Signed-off-by: Enrico Scholz's avatarEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
parent 3bdf00bf
......@@ -1637,7 +1637,7 @@ static int mx6s_vidioc_enum_framesizes(struct file *file, void *priv,
int ret;
fmt = format_by_fourcc(fsize->pixel_format);
if (fmt->pixelformat != fsize->pixel_format)
if (!fmt || fmt->pixelformat != fsize->pixel_format)
return -EINVAL;
fse.code = fmt->mbus_code;
......@@ -1679,7 +1679,7 @@ static int mx6s_vidioc_enum_frameintervals(struct file *file, void *priv,
int ret;
fmt = format_by_fourcc(interval->pixel_format);
if (fmt->pixelformat != interval->pixel_format)
if (!fmt || fmt->pixelformat != interval->pixel_format)
return -EINVAL;
fie.code = fmt->mbus_code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment