mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 09:56:00 +00:00
[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>
This commit is contained in:
parent
53e5ab946a
commit
b1aa60892e
@ -693,7 +693,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx,
|
||||
mf->code = 0;
|
||||
continue;
|
||||
}
|
||||
if (mf->width != tfmt->width || mf->width != tfmt->width) {
|
||||
if (mf->width != tfmt->width || mf->height != tfmt->height) {
|
||||
u32 fcc = ffmt->fourcc;
|
||||
tfmt->width = mf->width;
|
||||
tfmt->height = mf->height;
|
||||
@ -702,7 +702,8 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx,
|
||||
NULL, &fcc, FIMC_SD_PAD_SOURCE);
|
||||
if (ffmt && ffmt->mbus_code)
|
||||
mf->code = ffmt->mbus_code;
|
||||
if (mf->width != tfmt->width || mf->width != tfmt->width)
|
||||
if (mf->width != tfmt->width ||
|
||||
mf->height != tfmt->height)
|
||||
continue;
|
||||
tfmt->code = mf->code;
|
||||
}
|
||||
@ -710,7 +711,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx,
|
||||
ret = v4l2_subdev_call(csis, pad, set_fmt, NULL, &sfmt);
|
||||
|
||||
if (mf->code == tfmt->code &&
|
||||
mf->width == tfmt->width && mf->width == tfmt->width)
|
||||
mf->width == tfmt->width && mf->height == tfmt->height)
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user