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

Commit a75a7a53 authored by Mao Jinlong's avatar Mao Jinlong Committed by Gerrit - the friendly Code Review server
Browse files

coresight: tgu: Correct the check of timer_refcnt



timer_refcnt should be checked instead of select_refcnt when
set timer.

Change-Id: I6bd1803ad4cd60c4f688948c513129f48497829c
Signed-off-by: default avatarMao Jinlong <jinlmao@codeaurora.org>
parent 25a4e707
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -336,7 +336,7 @@ static ssize_t tgu_set_timers(struct device *dev, struct device_attribute *attr,
	unsigned long value;
	int step;

	if (drvdata->select_refcnt >= MAX_TIMER_COUNTER_SETS) {
	if (drvdata->timer_refcnt >= MAX_TIMER_COUNTER_SETS) {
		dev_err(drvdata->dev, " Too many groups are being configured");
		return -EINVAL;
	}