From: Julia Lawall Date: Thu, 12 Jan 2012 20:49:30 +0000 (-0300) Subject: [media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test X-Git-Tag: upstream/snapshot3+hdmi~7520^2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb869368f36abecc427ffa94193439a05c0aac8d;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test Rewrite a duplicated test to test the correct value The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression E; @@ ( * E || ... || E | * E && ... && E ) // Signed-off-by: Julia Lawall Acked-by: Kyungmin Park Signed-off-by: Marek Szyprowski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/s5p-mfc/s5p_mfc.c b/drivers/media/video/s5p-mfc/s5p_mfc.c index e43e128..90cc058 100644 --- a/drivers/media/video/s5p-mfc/s5p_mfc.c +++ b/drivers/media/video/s5p-mfc/s5p_mfc.c @@ -475,7 +475,7 @@ static void s5p_mfc_handle_seq_done(struct s5p_mfc_ctx *ctx, ctx->mv_size = 0; } ctx->dpb_count = s5p_mfc_get_dpb_count(); - if (ctx->img_width == 0 || ctx->img_width == 0) + if (ctx->img_width == 0 || ctx->img_height == 0) ctx->state = MFCINST_ERROR; else ctx->state = MFCINST_HEAD_PARSED;