From: jsg Date: Mon, 9 Sep 2024 09:53:32 +0000 (+0000) Subject: drm/amd/display: added NULL check at start of dc_validate_stream X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0e7b0bfbfb2269c85206cdb54db7c360ef506662;p=openbsd drm/amd/display: added NULL check at start of dc_validate_stream From winstang 154a50bf4221a6a6ccf88d565b8184da7c40a2dd in linux-6.6.y/6.6.50 26c56049cc4f1705b498df013949427692a4b0d5 in mainline linux --- 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 d0df3605231..a2f302d043c 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 @@ -3927,6 +3927,9 @@ void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream, enum dc_status dc_validate_stream(struct dc *dc, struct dc_stream_state *stream) { + if (dc == NULL || stream == NULL) + return DC_ERROR_UNEXPECTED; + struct dc_link *link = stream->link; struct timing_generator *tg = dc->res_pool->timing_generators[0]; enum dc_status res = DC_OK;