Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e3cbcb4 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "coresight: Delete path from active paths when exception happens"

parents 7ee9a802 8467c72f
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -905,7 +905,7 @@ static int coresight_store_path(struct list_head *path)
	return 0;
}

static void coresight_enable_source_link(struct list_head *path)
static int coresight_enable_source_link(struct list_head *path)
{
	u32 type;
	int ret;
@@ -951,10 +951,10 @@ static void coresight_enable_source_link(struct list_head *path)
		}
	}

	return;
	return 0;
err:
	coresight_disable_path_from(path, nd);
	coresight_release_path(path);
	return ret;
}

static void coresight_disable_source_link(struct list_head *path)
@@ -1012,13 +1012,22 @@ void coresight_disable_all_source_link(void)

void coresight_enable_all_source_link(void)
{
	struct list_head *path = NULL;
	struct coresight_path *cspath = NULL;
	struct coresight_path *cspath_next = NULL;
	int ret;


	mutex_lock(&coresight_mutex);

	list_for_each_entry_safe(cspath, cspath_next, &cs_active_paths, link) {
		coresight_enable_source_link(cspath->path);
		ret = coresight_enable_source_link(cspath->path);
		if (ret) {
			path = cspath->path;
			list_del(&cspath->link);
			kfree(cspath);
			coresight_release_path(path);
		}
	}

	if (activated_sink && activated_sink->enable)