[media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test
authorJulia Lawall <Julia.Lawall@lip6.fr>
Thu, 12 Jan 2012 20:49:30 +0000 (17:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 18 Jan 2012 00:53:46 +0000 (22:53 -0200)
Rewrite a duplicated test to test the correct value

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E;
@@

(
* E
  || ... || E
|
* E
  && ... && E
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/s5p-mfc/s5p_mfc.c

index e43e128baf5f7c3ec7051337a1574821e9e863a2..90cc05855ecb3d3ad20f490b1baa92e321369dab 100644 (file)
@@ -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;