drm/amd: remove possible condition with no effect (if == else)
authorBernard Zhao <bernard@vivo.com>
Tue, 23 Aug 2022 07:00:44 +0000 (00:00 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 25 Aug 2022 17:35:18 +0000 (13:35 -0400)
This patch fix cocci warning:
drivers/gpu/drm/amd/display/dc/core/dc.c:3335:2-4: WARNING:
possible condition with no effect (if == else).

Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index ced09f8..868618f 100644 (file)
@@ -3347,13 +3347,8 @@ static void commit_planes_for_stream(struct dc *dc,
                /* Since phantom pipe programming is moved to post_unlock_program_front_end,
                 * move the SubVP lock to after the phantom pipes have been setup
                 */
-               if (should_lock_all_pipes && dc->hwss.interdependent_update_lock) {
-                       if (dc->hwss.subvp_pipe_control_lock)
-                               dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
-               } else {
-                       if (dc->hwss.subvp_pipe_control_lock)
-                               dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
-               }
+               if (dc->hwss.subvp_pipe_control_lock)
+                       dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
                return;
        }