linux/drivers/media/platform/omap3isp
Javier Martinez Canillas 2ec7debd44 media: omap3isp: zero-initialize the isp cam_xclk{a,b} initial data
The struct clk_init_data init variable is declared in the isp_xclk_init()
function so is an automatic variable allocated in the stack. But it's not
explicitly zero-initialized, so some init fields are left uninitialized.

This causes the data structure to have undefined values that may confuse
the common clock framework when the clock is registered.

For example, the uninitialized .flags field could have the CLK_IS_CRITICAL
bit set, causing the framework to wrongly prepare the clk on registration.
This leads to the isp_xclk_prepare() callback being called, which in turn
calls to the omap3isp_get() function that increments the isp dev refcount.

Since this omap3isp_get() call is unexpected, this leads to an unbalanced
omap3isp_get() call that prevents the requested IRQ to be later enabled,
due the refcount not being 0 when the correct omap3isp_get() call happens.

Fixes: 9b28ee3c91 ("[media] omap3isp: Use the common clock framework")

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-06-28 09:21:58 -04:00
..
cfa_coef_table.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
gamma_table.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
isp.c media: omap3isp: zero-initialize the isp cam_xclk{a,b} initial data 2018-06-28 09:21:58 -04:00
isp.h media: omap3isp: Use generic parser for parsing fwnode endpoints 2017-10-31 13:48:44 -04:00
ispccdc.c media: platform: fix some 64-bits warnings 2018-04-17 05:50:00 -04:00
ispccdc.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispccp2.c media: omap3isp: Quit using struct v4l2_subdev.host_priv field 2017-08-20 08:18:38 -04:00
ispccp2.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispcsi2.c media: omap3isp: Quit using struct v4l2_subdev.host_priv field 2017-08-20 08:18:38 -04:00
ispcsi2.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispcsiphy.c media: omap3isp: Quit using struct v4l2_subdev.host_priv field 2017-08-20 08:18:38 -04:00
ispcsiphy.h media: omap3isp: csiphy: Don't assume the CSI receiver is a CSI2 module 2017-08-20 08:17:38 -04:00
isph3a_aewb.c media: omap3isp: support 64-bit version of omap3isp_stat_data 2018-05-09 16:37:05 -04:00
isph3a_af.c media: omap3isp: support 64-bit version of omap3isp_stat_data 2018-05-09 16:37:05 -04:00
isph3a.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
isphist.c media: omap3isp: support 64-bit version of omap3isp_stat_data 2018-05-09 16:37:05 -04:00
isphist.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
isppreview.c media: omap3isp: make omap3isp_prev_csc and omap3isp_prev_rgbtorgb const 2018-04-23 13:53:35 -04:00
isppreview.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispreg.h media: omap3isp: Correctly set IO_OUT_SEL and VP_CLK_POL for CCP2 mode 2017-08-20 08:16:13 -04:00
ispresizer.c [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispresizer.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispstat.c media: omap3isp: Don't use GFP_DMA 2018-05-09 16:38:38 -04:00
ispstat.h media: omap3isp: support 64-bit version of omap3isp_stat_data 2018-05-09 16:37:05 -04:00
ispvideo.c media: v4l: omap3isp: make v4l2_file_operations const 2018-04-23 13:44:23 -04:00
ispvideo.h [media] media/platform: convert drivers to use the new vb2_queue dev field 2016-07-08 14:40:50 -03:00
luma_enhance_table.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
noise_filter_table.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
omap3isp.h media: omap3isp: Parse CSI1 configuration from the device tree 2017-08-20 08:15:50 -04:00