Skip to content

Commit 3080122

Browse files
zhengbin13robclark
authored andcommitted
drm/msm/dpu: fix comparing pointer to 0 in dpu_encoder_phys_vid.c
Fixes coccicheck warning: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c:242:48-49: WARNING comparing pointer to 0 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c:562:25-26: WARNING comparing pointer to 0 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c:562:48-49: 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]>
1 parent 3279032 commit 3080122

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
239239
struct dpu_hw_intf_cfg intf_cfg = { 0 };
240240

241241
if (!phys_enc->hw_ctl->ops.setup_intf_cfg) {
242-
DPU_ERROR("invalid encoder %d\n", phys_enc != 0);
242+
DPU_ERROR("invalid encoder %d\n", phys_enc != NULL);
243243
return;
244244
}
245245

@@ -559,7 +559,7 @@ static void dpu_encoder_phys_vid_disable(struct dpu_encoder_phys *phys_enc)
559559

560560
if (!phys_enc->hw_intf) {
561561
DPU_ERROR("invalid hw_intf %d hw_ctl %d\n",
562-
phys_enc->hw_intf != 0, phys_enc->hw_ctl != 0);
562+
phys_enc->hw_intf != NULL, phys_enc->hw_ctl != NULL);
563563
return;
564564
}
565565

0 commit comments

Comments
 (0)