]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: atmel: atmel-isc-base: properly initialize pad_cfg
authorEugen Hristev <eugen.hristev@microchip.com>
Mon, 25 Nov 2019 08:32:51 +0000 (09:32 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Dec 2019 09:15:33 +0000 (10:15 +0100)
In try_fmt, properly initialize the pad_cfg variable to zeros.
This can be used by various calls from the subdev, so it's better
to have it initialized.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
[hverkuil-cisco@xs4all.nl: changed {0} to {}]
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/atmel/atmel-isc-base.c

index 623e76884a97e17aaa73fed6d9e9d03b7d58bf2c..337499d75e69515de6d0a4d8a6397e6849aa84d4 100644 (file)
@@ -1216,7 +1216,7 @@ static int isc_try_fmt(struct isc_device *isc, struct v4l2_format *f,
        int i;
        struct isc_format *sd_fmt = NULL, *direct_fmt = NULL;
        struct v4l2_pix_format *pixfmt = &f->fmt.pix;
-       struct v4l2_subdev_pad_config pad_cfg;
+       struct v4l2_subdev_pad_config pad_cfg = {};
        struct v4l2_subdev_format format = {
                .which = V4L2_SUBDEV_FORMAT_TRY,
        };