Merge "msm: camera: isp: Initialize or validate variables before use"
This commit is contained in:
commit
e3cfe4f4b3
2 changed files with 7 additions and 5 deletions
|
@ -1074,7 +1074,7 @@ static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev_ioctl,
|
||||||
uint32_t comp_stats_mask[MAX_NUM_STATS_COMP_MASK] = {0};
|
uint32_t comp_stats_mask[MAX_NUM_STATS_COMP_MASK] = {0};
|
||||||
uint32_t num_stats_comp_mask = 0;
|
uint32_t num_stats_comp_mask = 0;
|
||||||
struct msm_vfe_stats_stream *stream_info;
|
struct msm_vfe_stats_stream *stream_info;
|
||||||
struct msm_vfe_stats_shared_data *stats_data;
|
struct msm_vfe_stats_shared_data *stats_data = NULL;
|
||||||
int num_stream = 0;
|
int num_stream = 0;
|
||||||
struct msm_vfe_stats_stream *streams[MSM_ISP_STATS_MAX];
|
struct msm_vfe_stats_stream *streams[MSM_ISP_STATS_MAX];
|
||||||
struct msm_isp_timestamp timestamp;
|
struct msm_isp_timestamp timestamp;
|
||||||
|
@ -1136,10 +1136,12 @@ static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev_ioctl,
|
||||||
comp_stats_mask[stream_info->composite_flag-1] |=
|
comp_stats_mask[stream_info->composite_flag-1] |=
|
||||||
1 << idx;
|
1 << idx;
|
||||||
|
|
||||||
ISP_DBG("%s: stats_mask %x %x active streams %d\n",
|
ISP_DBG("%s: stats_mask %x %x\n",
|
||||||
__func__, comp_stats_mask[0],
|
__func__, comp_stats_mask[0],
|
||||||
comp_stats_mask[1],
|
comp_stats_mask[1]);
|
||||||
stats_data->num_active_stream);
|
if (stats_data)
|
||||||
|
ISP_DBG("%s: active_streams = %d\n", __func__,
|
||||||
|
stats_data->num_active_stream);
|
||||||
streams[num_stream++] = stream_info;
|
streams[num_stream++] = stream_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1662,7 +1662,7 @@ static long msm_ispif_subdev_fops_ioctl(struct file *file, unsigned int cmd,
|
||||||
static int ispif_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
static int ispif_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
||||||
{
|
{
|
||||||
struct ispif_device *ispif = v4l2_get_subdevdata(sd);
|
struct ispif_device *ispif = v4l2_get_subdevdata(sd);
|
||||||
int rc;
|
int rc = 0;
|
||||||
|
|
||||||
mutex_lock(&ispif->mutex);
|
mutex_lock(&ispif->mutex);
|
||||||
if (0 == ispif->open_cnt) {
|
if (0 == ispif->open_cnt) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue