diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-01-12 15:49:28 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-17 19:53:34 -0500 |
commit | b1aa60892ecc1ba03185e7dfed99cc9202ef03b7 (patch) | |
tree | e268ae2b720c250e04a616d4cf2c4b47f1182227 | |
parent | 53e5ab946a1773f589b97df6ae1cc72b52656a7d (diff) |
[media] drivers/media/video/s5p-fimc/fimc-capture.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/)
// <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>
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-capture.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 510cfab477ff..a9e9653beeb4 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c | |||
@@ -693,7 +693,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx, | |||
693 | mf->code = 0; | 693 | mf->code = 0; |
694 | continue; | 694 | continue; |
695 | } | 695 | } |
696 | if (mf->width != tfmt->width || mf->width != tfmt->width) { | 696 | if (mf->width != tfmt->width || mf->height != tfmt->height) { |
697 | u32 fcc = ffmt->fourcc; | 697 | u32 fcc = ffmt->fourcc; |
698 | tfmt->width = mf->width; | 698 | tfmt->width = mf->width; |
699 | tfmt->height = mf->height; | 699 | tfmt->height = mf->height; |
@@ -702,7 +702,8 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx, | |||
702 | NULL, &fcc, FIMC_SD_PAD_SOURCE); | 702 | NULL, &fcc, FIMC_SD_PAD_SOURCE); |
703 | if (ffmt && ffmt->mbus_code) | 703 | if (ffmt && ffmt->mbus_code) |
704 | mf->code = ffmt->mbus_code; | 704 | mf->code = ffmt->mbus_code; |
705 | if (mf->width != tfmt->width || mf->width != tfmt->width) | 705 | if (mf->width != tfmt->width || |
706 | mf->height != tfmt->height) | ||
706 | continue; | 707 | continue; |
707 | tfmt->code = mf->code; | 708 | tfmt->code = mf->code; |
708 | } | 709 | } |
@@ -710,7 +711,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx, | |||
710 | ret = v4l2_subdev_call(csis, pad, set_fmt, NULL, &sfmt); | 711 | ret = v4l2_subdev_call(csis, pad, set_fmt, NULL, &sfmt); |
711 | 712 | ||
712 | if (mf->code == tfmt->code && | 713 | if (mf->code == tfmt->code && |
713 | mf->width == tfmt->width && mf->width == tfmt->width) | 714 | mf->width == tfmt->width && mf->height == tfmt->height) |
714 | break; | 715 | break; |
715 | } | 716 | } |
716 | 717 | ||