Skip to contentSkip to conversation

perf symbols: Remove needless checks for map->groups->machine

tip: perf/core tip-bot2 for Arnaldo Carvalho de Melo 1 participant 1 message Nov 12, 2019 1 message not in the archive perf events

lore
Share & tools
lore

tip-bot2 for Arnaldo Carvalho de Melo

author merge bot Applied
#1 lore raw
In reply to a message not in the archive

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     b0c76fc4cfd96ae859cc50afe5deb523276f75ae
Gitweb:        https://git.kernel.org/tip/b0c76fc4cfd96ae859cc50afe5deb523276f75ae
Author:        Arnaldo Carvalho de Melo <[email protected]>
AuthorDate:    Fri, 01 Nov 2019 18:34:44 -03:00
Committer:     Arnaldo Carvalho de Melo <[email protected]>
CommitterDate: Thu, 07 Nov 2019 08:30:18 -03:00

perf symbols: Remove needless checks for map->groups->machine

Its sufficient to check if map->groups is NULL before using it to get ->machine value.

---
 tools/perf/util/symbol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/symbol.c +1 -1
index a4bd61c..4ad39cc 100644
@@ -1617,7 +1617,7 @@ int dso__load(struct dso *dso, struct map *map)
 		goto out;
 	}
 
-	if (map->groups && map->groups->machine)
+	if (map->groups)
 		machine = map->groups->machine;
 	else
 		machine = NULL;