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

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

Merge "coresight: Forbid enabling sink while reading sink"

parents 016b45df b20c6194
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -1151,7 +1151,6 @@ static ssize_t enable_sink_store(struct device *dev,
	int ret;
	unsigned long val;
	struct coresight_device *csdev = to_coresight_device(dev);
	struct coresight_device *sink = NULL;

	ret = kstrtoul(buf, 10, &val);
	if (ret)
@@ -1159,10 +1158,7 @@ static ssize_t enable_sink_store(struct device *dev,
	mutex_lock(&coresight_mutex);

	if (val) {
		sink = activated_sink ? activated_sink :
			coresight_get_enabled_sink(false);
		if (sink && strcmp(dev_name(&sink->dev),
				dev_name(&csdev->dev)))
		if (activated_sink)
			goto err;
		csdev->activated = true;
	} else {