Skip to content

Commit

Permalink
drm/msm/dpu: fix comparing pointer to 0 in dpu_vbif.c
Browse files Browse the repository at this point in the history
Fixes coccicheck warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c:27:51-52: WARNING comparing pointer to 0
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c:109:51-52: WARNING comparing pointer to 0
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c:167:12-13: WARNING comparing pointer to 0
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c:167:22-23: WARNING comparing pointer to 0

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zheng Bin <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
  • Loading branch information
zhengbin13 authored and robclark committed Mar 19, 2020
1 parent 3080122 commit a41aa44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static int _dpu_vbif_wait_for_xin_halt(struct dpu_hw_vbif *vbif, u32 xin_id)
int rc;

if (!vbif || !vbif->cap || !vbif->ops.get_halt_ctrl) {
DPU_ERROR("invalid arguments vbif %d\n", vbif != 0);
DPU_ERROR("invalid arguments vbif %d\n", vbif != NULL);
return -EINVAL;
}

Expand Down Expand Up @@ -106,7 +106,7 @@ static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif,
u32 val;

if (!vbif || !vbif->cap) {
DPU_ERROR("invalid arguments vbif %d\n", vbif != 0);
DPU_ERROR("invalid arguments vbif %d\n", vbif != NULL);
return -EINVAL;
}

Expand Down Expand Up @@ -164,7 +164,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms,

if (!vbif || !mdp) {
DPU_DEBUG("invalid arguments vbif %d mdp %d\n",
vbif != 0, mdp != 0);
vbif != NULL, mdp != NULL);
return;
}

Expand Down

0 comments on commit a41aa44

Please sign in to comment.