Unverified Commit 539cf90d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4014 drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()

parents 1b7d9c6c ffd29abb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2612,14 +2612,14 @@ static struct drm_dp_mst_branch *get_mst_branch_device_by_guid_helper(
	struct drm_dp_mst_branch *found_mstb;
	struct drm_dp_mst_port *port;

	if (!mstb)
		return NULL;

	if (memcmp(mstb->guid, guid, 16) == 0)
		return mstb;


	list_for_each_entry(port, &mstb->ports, next) {
		if (!port->mstb)
			continue;

		found_mstb = get_mst_branch_device_by_guid_helper(port->mstb, guid);

		if (found_mstb)