drm/amd/display: Check for NULL pointer
authorjsg <jsg@openbsd.org>
Mon, 5 Aug 2024 02:37:12 +0000 (02:37 +0000)
committerjsg <jsg@openbsd.org>
Mon, 5 Aug 2024 02:37:12 +0000 (02:37 +0000)
From Sung Joon Kim
4ccd37085976ea5d3c499b1e6d0b3f4deaf2cd5a in linux-6.6.y/6.6.44
4ab68e168ae1695f7c04fae98930740aaf7c50fa in mainline linux

sys/dev/pci/drm/amd/display/dc/core/dc_surface.c

index a80e453..f4f3ca7 100644 (file)
@@ -154,7 +154,8 @@ const struct dc_plane_status *dc_plane_get_status(
                if (pipe_ctx->plane_state != plane_state)
                        continue;
 
-               pipe_ctx->plane_state->status.is_flip_pending = false;
+               if (pipe_ctx->plane_state)
+                       pipe_ctx->plane_state->status.is_flip_pending = false;
 
                break;
        }