drm/amd/display: Fix warning comparing pointer to 0
authorchongjiapeng <jiapeng.chong@linux.alibaba.com>
Mon, 6 Sep 2021 09:23:28 +0000 (17:23 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Sep 2021 17:30:50 +0000 (13:30 -0400)
Fix the following coccicheck warning:

./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:643:35-36:
WARNING comparing pointer to 0.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c

index 4a4894e9d9c9a132ed4793995e9e0ee252520ea0..15491e3ca11a68c4e3ee08d895132de065cb9831 100644 (file)
@@ -640,7 +640,7 @@ void dcn31_clk_mgr_construct(
                                sizeof(struct dcn31_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;
        }