From: Zhang, Yanmin Date: Thu, 25 Feb 2010 03:00:51 +0000 (+0800) Subject: perf symbols: Check the right return variable X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=37fe5fcb7a5b5235c8b71bf5469ce4c7246e3fab;p=openwrt%2Fstaging%2Fblogic.git perf symbols: Check the right return variable In function dso__split_kallsyms(), curr_map saves the return value of map__new2. So check it instead of var map after the call returns. Signed-off-by: Zhang Yanmin Acked-by: David S. Miller Cc: # for .33.x Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: <1267066851.1726.9.camel@localhost> Signed-off-by: Ingo Molnar --- diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index ee9c37efdd36..320b15178e95 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -527,7 +527,7 @@ static int dso__split_kallsyms(struct dso *self, struct map *map, return -1; curr_map = map__new2(pos->start, dso, map->type); - if (map == NULL) { + if (curr_map == NULL) { dso__delete(dso); return -1; }