Skip to content

Commit

Permalink
msm: camera: isp: Fix warning and errors based on static analysis
Browse files Browse the repository at this point in the history
This change fixes the warning/errors from static analysis

CRs-fixed: 992942
CAF-Change-Id: Iaf90ab4c1d17f903d03458d76cab1b4c0a5c8836
Signed-off-by: Jing Zhou <[email protected]>
CVE-2016-2061
Signed-off-by: Kevin F. Haggerty <[email protected]>

Change-Id: I4c01bfdd5de880cf31886e9935b24360ad74635e
Signed-off-by: Francisco Franco <[email protected]>
  • Loading branch information
Jing Zhou authored and franciscofranco committed Sep 16, 2017
1 parent b0cdfb8 commit cf272ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 2 additions & 1 deletion drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ int msm_isp_axi_create_stream(
struct msm_vfe_axi_shared_data *axi_data,
struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd)
{
int i, rc = -1;
int rc = -1;
uint32_t i;
for (i = 0; i < MAX_NUM_STREAM; i++) {
if (axi_data->stream_info[i].state == AVALIABLE)
break;
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,6 @@ void msm_isp_update_error_frame_count(struct vfe_device *vfe_dev)
{
struct msm_vfe_error_info *error_info = &vfe_dev->error_info;
error_info->info_dump_frame_count++;
if (error_info->info_dump_frame_count == 0)
error_info->info_dump_frame_count++;
}

void msm_isp_process_error_info(struct vfe_device *vfe_dev)
Expand Down
14 changes: 7 additions & 7 deletions drivers/media/platform/msm/camera_v2/ispif/msm_ispif.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,23 +160,23 @@ static void msm_ispif_sel_csid_core(struct ispif_device *ispif,
switch (intftype) {
case PIX0:
data &= ~(BIT(1) | BIT(0));
data |= csid;
data |= (uint32_t) csid;
break;
case RDI0:
data &= ~(BIT(5) | BIT(4));
data |= (csid << 4);
data |= ((uint32_t) csid) << 4;
break;
case PIX1:
data &= ~(BIT(9) | BIT(8));
data |= (csid << 8);
data |= ((uint32_t) csid) << 8;
break;
case RDI1:
data &= ~(BIT(13) | BIT(12));
data |= (csid << 12);
data |= ((uint32_t) csid) << 12;
break;
case RDI2:
data &= ~(BIT(21) | BIT(20));
data |= (csid << 20);
data |= ((uint32_t) csid) << 20;
break;
}

Expand Down Expand Up @@ -252,9 +252,9 @@ static void msm_ispif_enable_intf_cids(struct ispif_device *ispif,

data = msm_camera_io_r(ispif->base + intf_addr);
if (enable)
data |= cid_mask;
data |= (uint32_t) cid_mask;
else
data &= ~cid_mask;
data &= ~((uint32_t) cid_mask);
msm_camera_io_w_mb(data, ispif->base + intf_addr);
}

Expand Down

0 comments on commit cf272ee

Please sign in to comment.