summaryrefslogtreecommitdiff
path: root/drivers/media/platform/exynos-gsc/gsc-m2m.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-09-15 15:54:34 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-18 15:09:08 -0500
commit97913bcbe6da3957af27d9fdd76b3d97b99e6d6a (patch)
tree60ab8ddb896b454ae99f021987528a143cb90481 /drivers/media/platform/exynos-gsc/gsc-m2m.c
parentff51762f8b305bb55f6f5f3f33b204104b2e8a2d (diff)
media: exynos4-is: properly initialize frame format
We copy the subdev frame format from a partially initialized structure, which is not entirely well-defined. Older compilers like gcc-4.4 can copy uninitialized stack data here and warn about it: drivers/media/platform/exynos4-is/fimc-isp.c: In function 'fimc_isp_subdev_open': drivers/media/platform/exynos4-is/fimc-isp.c:379: error: 'fmt.reserved[10u]' may be used uninitialized in this function drivers/media/platform/exynos4-is/fimc-isp.c:379: error: 'fmt.reserved[9u]' may be used uninitialized in this function ... drivers/media/platform/exynos4-is/fimc-isp.c:379: error: 'fmt.reserved[0u]' may be used uninitialized in this function drivers/media/platform/exynos4-is/fimc-isp.c:379: error: 'fmt.xfer_func' may be used uninitialized in this function On newer compilers, only the initialized fields get copied, but we should not rely on that, so this changes the code to zero-out the remaining fields first. Fixes: 9a761e436843 ("[media] exynos4-is: Add Exynos4x12 FIMC-IS driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/exynos-gsc/gsc-m2m.c')
0 files changed, 0 insertions, 0 deletions