Skip to content

Commit

Permalink
drm/amd/display: Fix warning comparing pointer to 0
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:

./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c:744:35-36:
WARNING comparing pointer to 0.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Jiapeng Chong authored and Guchun Chen committed Dec 22, 2021
1 parent cb1e323 commit 7a4427f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
Original file line number Diff line number Diff line change
@@ -741,7 +741,7 @@ void vg_clk_mgr_construct(
sizeof(struct watermarks),
&clk_mgr->smu_wm_set.mc_address.quad_part);

if (clk_mgr->smu_wm_set.wm_set == 0) {
if (!clk_mgr->smu_wm_set.wm_set) {
clk_mgr->smu_wm_set.wm_set = &dummy_wms;
clk_mgr->smu_wm_set.mc_address.quad_part = 0;
}

0 comments on commit 7a4427f

Please sign in to comment.