media: rkisp1: params: remove extra 'if' conditions
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Mon, 1 Mar 2021 17:18:34 +0000 (18:18 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Mar 2021 10:59:43 +0000 (11:59 +0100)
commit18a4ca76ada464b3240f194800d41ea21fbb4229
tree943b1c37238853f119e4a54d5dec9ead14e5376b
parent4fade8329ab2be2b902fce8db3625fd12234b873
media: rkisp1: params: remove extra 'if' conditions

There is a repeating code pattern:

if (a || b) {
if (a)
...
if (b)
...
}

In this pattern, the first 'if' is redundant.
The code can be replaced with:

if (a)
...
if (b)
...

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/rockchip/rkisp1/rkisp1-params.c