drm/amd/display: Check stream before comparing them
authorjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:23:25 +0000 (02:23 +0000)
committerjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:23:25 +0000 (02:23 +0000)
From Alex Hung
42d31a33643813cce55ee1ebbad3a2d0d24a08e0 in linux-6.6.y/6.6.55
35ff747c86767937ee1e0ca987545b7eed7a0810 in mainline linux

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

index 32df227..01e56d1 100644 (file)
@@ -2154,6 +2154,8 @@ static bool are_stream_backends_same(
 bool dc_is_stream_unchanged(
        struct dc_stream_state *old_stream, struct dc_stream_state *stream)
 {
+       if (!old_stream || !stream)
+               return false;
 
        if (!are_stream_backends_same(old_stream, stream))
                return false;