summaryrefslogtreecommitdiffstats
path: root/drivers/media/spi
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-03-22 10:34:22 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-03-29 07:40:10 -0400
commit0e633f97162c1c74c68e2eb20bbd9259dce87cd9 (patch)
tree48114a3f4ca46fa9f277efafe6001cb1da5c4c76 /drivers/media/spi
parent5f2efda71c09b12012053f457fac7692f268b72c (diff)
downloadlinux-0e633f97162c1c74c68e2eb20bbd9259dce87cd9.tar.bz2
media: davinci-isif: avoid uninitialized variable use
clang warns about a possible variable use that gcc never complained about: drivers/media/platform/davinci/isif.c:982:32: error: variable 'frame_size' is uninitialized when used here [-Werror,-Wuninitialized] dm365_vpss_set_pg_frame_size(frame_size); ^~~~~~~~~~ drivers/media/platform/davinci/isif.c:887:2: note: variable 'frame_size' is declared here struct vpss_pg_frame_size frame_size; ^ 1 error generated. There is no initialization for this variable at all, and there has never been one in the mainline kernel, so we really should not put that stack data into an mmio register. On the other hand, I suspect that gcc checks the condition more closely and notices that the global isif_cfg.bayer.config_params.test_pat_gen flag is initialized to zero and never written to from any code path, so anything depending on it can be eliminated. To shut up the clang warning, just remove the dead code manually, it has probably never been used because any attempt to do so would have resulted in undefined behavior. Fixes: 63e3ab142fa3 ("V4L/DVB: V4L - vpfe capture - source for ISIF driver on DM365") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/spi')
0 files changed, 0 insertions, 0 deletions