From 5a38b60f969b3474beb001aa70db753a29437ea8 Mon Sep 17 00:00:00 2001 From: Cho KyongHo Date: Thu, 5 Jan 2017 22:40:30 +0900 Subject: [PATCH] [COMMON] media: smfc: fix missing vertical subasampling check HWJPEG is unable to handle YUV410. Therefore, the driver should check if both of the horizontal and vertical chroma subsampling factor is 4. However, the driver checked horizontal factor instead of vertical factor. SVACE WGID 2521 Change-Id: I187ff5e4d0c3ff9cf1efdd97b86b7e09c4754af0 Signed-off-by: Cho KyongHo --- drivers/media/platform/exynos/smfc/smfc-stream-parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos/smfc/smfc-stream-parser.c b/drivers/media/platform/exynos/smfc/smfc-stream-parser.c index 528e31a3ba31..b2d09840a2a0 100644 --- a/drivers/media/platform/exynos/smfc/smfc-stream-parser.c +++ b/drivers/media/platform/exynos/smfc/smfc-stream-parser.c @@ -269,7 +269,7 @@ static int smfc_parse_frameheader(struct smfc_ctx *ctx, unsigned long *cursor) u8 v = pos[1] & 0xF; if ((pos[0] < 1) || (pos[0] > 4) || (pos[2] > 4) - || (h > 4) || (h > 4)) { + || (h > 4) || (v > 4)) { dev_err(ctx->smfc->dev, "Invalid component data in SOF0 %02x%02x%02x", pos[0], pos[1], pos[2]); -- 2.20.1