Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3cfe4f4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Initialize or validate variables before use"

parents de5618ca 5159d3ed
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -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,9 +1136,11 @@ 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]);
		if (stats_data)
			ISP_DBG("%s: active_streams = %d\n", __func__,
				stats_data->num_active_stream);
				stats_data->num_active_stream);
		streams[num_stream++] = stream_info;
		streams[num_stream++] = stream_info;
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -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) {