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

Commit 339d08e5 authored by Carter Cooper's avatar Carter Cooper
Browse files

msm: kgsl: Fix profiler group id comparison



Not all groups have names all the time.  Do the right things when
the group id doesn't have a name.  Also make sure the strings are
actually equal in length to avoid subset group names like vbif and
vbif_pwr.

Change-Id: I68c9db519e46e962120856fdff1d1c46de55ca70
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent b5c75c4d
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -424,7 +424,14 @@ int adreno_perfcounter_get_groupid(struct adreno_device *adreno_dev,

	for (i = 0; i < counters->group_count; ++i) {
		group = &(counters->groups[i]);
		if (!strcmp(group->name, name))

		/* make sure there is a name for this group */
		if (group->name == NULL)
			continue;

		/* verify name and length */
		if (strlen(name) == strlen(group->name) &&
			strcmp(group->name, name) == 0)
			return i;
	}