[COMMON] media: scaler: delete unnecessary check code
authorwoncheon.an <woncheon.an@samsung.com>
Mon, 6 Feb 2017 08:07:43 +0000 (17:07 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:28:24 +0000 (14:28 +0900)
Minumum size of Src is 16x16 and minimum size of Dst is 4x4.
So deleted check code is always false
Therefore Src->Dst scaling ratio check code is unnecessary

Change-Id: I383e0765a4db33ff337fb675c07e145c4ca5ec37
Signed-off-by: woncheon.an <woncheon.an@samsung.com>
drivers/media/platform/exynos/scaler/scaler-core.c

index ee56fa700887a279e2d58cfa55dbfb453f408ee0..ea01d5c66bed67176d51c818131eeaca43a2ef80 100644 (file)
@@ -1345,32 +1345,14 @@ static int sc_prepare_2nd_scaling(struct sc_ctx *ctx,
        if (*v_ratio > SCALE_RATIO_CONST(4, 1))
                crop.height = ((src_height + 7) / 8) * 2;
 
-       if (crop.height < limit->min_h) {
-               if (SCALE_RATIO(limit->min_h, ctx->d_frame.crop.height)
-                                               > SCALE_RATIO_CONST(4, 1)) {
-                       dev_err(sc->dev, "Failed height scale down %d -> %d\n",
-                               src_height, ctx->d_frame.crop.height);
-
-                       free_intermediate_frame(ctx);
-                       return -EINVAL;
-               }
+       if (crop.height < limit->min_h)
                crop.height = limit->min_h;
-       }
 
        if (*h_ratio > SCALE_RATIO_CONST(4, 1))
                crop.width = ((src_width + 7) / 8) * 2;
 
-       if (crop.width < limit->min_w) {
-               if (SCALE_RATIO(limit->min_w, ctx->d_frame.crop.width)
-                                               > SCALE_RATIO_CONST(4, 1)) {
-                       dev_err(sc->dev, "Failed width scale down %d -> %d\n",
-                               src_width, ctx->d_frame.crop.width);
-
-                       free_intermediate_frame(ctx);
-                       return -EINVAL;
-               }
+       if (crop.width < limit->min_w)
                crop.width = limit->min_w;
-       }
 
        if (*v_ratio < SCALE_RATIO_CONST(1, 8)) {
                crop.height = src_height * 8;