Skip to content

Commit

Permalink
[media] s5p-mfc: remove unnecessary check in try_fmt
Browse files Browse the repository at this point in the history
We don't need to request the sizeimage or num_planes
in try_fmt.

Signed-off-by: ayaka <ayaka@soulik.info>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
ayaka authored and Mauro Carvalho Chehab committed Jun 7, 2016
1 parent bcbf298 commit ee0829f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,10 +1043,6 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
mfc_err("failed to try output format\n");
return -EINVAL;
}
if (pix_fmt_mp->plane_fmt[0].sizeimage == 0) {
mfc_err("must be set encoding output size\n");
return -EINVAL;
}
if ((dev->variant->version_bit & fmt->versions) == 0) {
mfc_err("Unsupported format by this MFC version.\n");
return -EINVAL;
Expand All @@ -1060,11 +1056,6 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
mfc_err("failed to try output format\n");
return -EINVAL;
}

if (fmt->num_planes != pix_fmt_mp->num_planes) {
mfc_err("failed to try output format\n");
return -EINVAL;
}
if ((dev->variant->version_bit & fmt->versions) == 0) {
mfc_err("Unsupported format by this MFC version.\n");
return -EINVAL;
Expand Down

0 comments on commit ee0829f

Please sign in to comment.