From 289ae2095a24d7b53abcdb4fb884f3c96eb9711c Mon Sep 17 00:00:00 2001 From: Zhaowei Yuan Date: Tue, 12 Aug 2014 13:49:10 +0800 Subject: [PATCH] media: s5p_mfc: Remove unnecessary checking for fmt->type If find_format(f, MFC_FMT_DEC) didn't return a NULL pointer, then the value of fmt->type must be MFC_FMT_DEC. It's unnecessary to check it here. Change-Id: I6c1146d33e014465fbdf8b085f0264fd60788260 Signed-off-by: Zhaowei Yuan --- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 2dd5385..5d702cc 100755 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -452,12 +452,7 @@ static int vidioc_s_fmt(struct file *file, void *priv, struct v4l2_format *f) ret = -EINVAL; goto out; } - if (fmt->type != MFC_FMT_DEC) { - mfc_err("Wrong format selected, you should choose " - "format for decoding\n"); - ret = -EINVAL; - goto out; - } + if (!IS_MFCV6(dev) && (fmt->fourcc == V4L2_PIX_FMT_VP8)) { mfc_err("Not supported format.\n"); return -EINVAL; -- 2.7.4