Skip to content

Commit 3279032

Browse files
zhengbin13robclark
authored andcommitted
drm/msm/dpu: fix comparing pointer to 0 in dpu_encoder_phys_cmd.c
Fixes coccicheck warning: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:414:52-53: WARNING comparing pointer to 0 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:443:56-57: 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 acc978d commit 3279032

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_cmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ static void _dpu_encoder_phys_cmd_pingpong_config(
411411
to_dpu_encoder_phys_cmd(phys_enc);
412412

413413
if (!phys_enc->hw_pp || !phys_enc->hw_ctl->ops.setup_intf_cfg) {
414-
DPU_ERROR("invalid arg(s), enc %d\n", phys_enc != 0);
414+
DPU_ERROR("invalid arg(s), enc %d\n", phys_enc != NULL);
415415
return;
416416
}
417417

@@ -440,7 +440,7 @@ static void dpu_encoder_phys_cmd_enable_helper(
440440
u32 flush_mask = 0;
441441

442442
if (!phys_enc->hw_pp) {
443-
DPU_ERROR("invalid arg(s), encoder %d\n", phys_enc != 0);
443+
DPU_ERROR("invalid arg(s), encoder %d\n", phys_enc != NULL);
444444
return;
445445
}
446446

0 commit comments

Comments
 (0)