drm/amd/display: remove an unnecessary NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Jul 2020 10:57:00 +0000 (13:57 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Jul 2020 18:38:56 +0000 (14:38 -0400)
The "stream" pointer can't be NULL and it's dereferenced on the line
before so the check doesn't make sense.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index a9a5ef250a9e3f150df42fdde56974f45f7e248e..ef0b5941bc500cd6224ee26e463b040f1bdc716a 100644 (file)
@@ -2324,7 +2324,7 @@ static void commit_planes_for_stream(struct dc *dc,
 
        if ((update_type != UPDATE_TYPE_FAST) && stream->update_flags.bits.dsc_changed)
                if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) {
-                       if (stream && should_use_dmub_lock(stream->link)) {
+                       if (should_use_dmub_lock(stream->link)) {
                                union dmub_hw_lock_flags hw_locks = { 0 };
                                struct dmub_hw_lock_inst_flags inst_flags = { 0 };