]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
media: atomisp: fix call to g_frame_interval
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 21 Jun 2020 06:32:27 +0000 (08:32 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 18 Jul 2020 05:12:46 +0000 (07:12 +0200)
The media core has now a check if fi->pad is bigger than zero
or bigger than sd->entity.num_pads, if the media controller
is defined.

This causes a call to g_frame_interval to return -EINVAL.

Fix it by first cleaning up the struct.

Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_cmd.c

index 7b936e5a5f037ac370e6921f72d9cda80c7f2b74..388b574552043ac682223649dff758b31f73e4ac 100644 (file)
@@ -109,7 +109,7 @@ struct atomisp_acc_pipe *atomisp_to_acc_pipe(struct video_device *dev)
 
 static unsigned short atomisp_get_sensor_fps(struct atomisp_sub_device *asd)
 {
-       struct v4l2_subdev_frame_interval fi;
+       struct v4l2_subdev_frame_interval fi = { 0 };
        struct atomisp_device *isp = asd->isp;
 
        unsigned short fps = 0;