Commit 30801221 authored by Zheng Bin's avatar Zheng Bin Committed by Rob Clark

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZheng Bin <zhengbin13@huawei.com>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 32790324
...@@ -239,7 +239,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine( ...@@ -239,7 +239,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
struct dpu_hw_intf_cfg intf_cfg = { 0 }; struct dpu_hw_intf_cfg intf_cfg = { 0 };
if (!phys_enc->hw_ctl->ops.setup_intf_cfg) { if (!phys_enc->hw_ctl->ops.setup_intf_cfg) {
DPU_ERROR("invalid encoder %d\n", phys_enc != 0); DPU_ERROR("invalid encoder %d\n", phys_enc != NULL);
return; return;
} }
...@@ -559,7 +559,7 @@ static void dpu_encoder_phys_vid_disable(struct dpu_encoder_phys *phys_enc) ...@@ -559,7 +559,7 @@ static void dpu_encoder_phys_vid_disable(struct dpu_encoder_phys *phys_enc)
if (!phys_enc->hw_intf) { if (!phys_enc->hw_intf) {
DPU_ERROR("invalid hw_intf %d hw_ctl %d\n", DPU_ERROR("invalid hw_intf %d hw_ctl %d\n",
phys_enc->hw_intf != 0, phys_enc->hw_ctl != 0); phys_enc->hw_intf != NULL, phys_enc->hw_ctl != NULL);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment