Unverified Commit 695f80c3 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12825 drm/amd/display: Check null pointers before using them

parents 645dfd83 d2a9cd4f
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -5385,6 +5385,9 @@ create_validate_stream_for_sink(struct amdgpu_dm_connector *aconnector,
	int requested_bpc = drm_state ? drm_state->max_requested_bpc : 8;
	enum dc_status dc_result = DC_OK;

	if (!dm_state)
		return NULL;

	do {
		stream = create_stream_for_sink(aconnector, drm_mode,
						dm_state, old_stream,
@@ -7801,6 +7804,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
		}

		if (is_content_protection_different(new_con_state, old_con_state, connector, adev->dm.hdcp_workqueue))
			if (aconnector->dc_link)
				hdcp_update_display(
					adev->dm.hdcp_workqueue, aconnector->dc_link->link_index, aconnector,
					new_con_state->hdcp_content_type,