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)
commitd6ad1c9bbadd83889080350489bc63f7ff9207f0
tree2dae557dd1bac42112281b7142497d0a9694edac
parente2c57942382dd1ace16b90c73febdd31666f2ad3
media: atomisp: fix call to g_frame_interval

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