From a6b1359761d1e5054a57f711f94f8a170a65760f Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 11 Oct 2024 02:23:25 +0000 Subject: [PATCH] drm/amd/display: Check stream before comparing them 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c b/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c index 32df2279f61..01e56d1e942 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c +++ b/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c @@ -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; -- 2.20.1