]> git.baikalelectronics.ru Git - kernel.git/commit
media: imx: imx7_mipi_csis: convert some switch cases to the default
authorTom Rix <trix@redhat.com>
Mon, 31 May 2021 17:43:00 +0000 (19:43 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 4 Aug 2021 12:43:51 +0000 (14:43 +0200)
commitd898ea53a546f2c9ac76ba5f5dbc0c6a302e3659
treee29666a8ef07eb66262d0935728003b38213bcb0
parent35b2c430f083b41a5560980f3847b0529b1ca0d6
media: imx: imx7_mipi_csis: convert some switch cases to the default

Static analysis reports this false positive
imx7-mipi-csis.c:1027:2: warning: 4th function call argument is
  an uninitialized value

The variable 'align' is falsely reported as uninitialized.
Even though all the cases are covered in the
switch (csis_fmt->width % 8) {

Because there is no default case, it is reported as uninialized.

Improve the switch by converting the most numerous set of cases
to the default and silence the false positive.

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx7-mipi-csis.c