[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-37fe5fcb7a5b5235c8b71bf5469ce4c7246e3fab@git.kernel.org>
Date: Thu, 25 Feb 2010 11:18:34 GMT
From: "tip-bot for Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
efault@....de, yanmin_zhang@...ux.intel.com, davem@...emloft.net,
fweisbec@...il.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/core] perf symbols: Check the right return variable
Commit-ID: 37fe5fcb7a5b5235c8b71bf5469ce4c7246e3fab
Gitweb: http://git.kernel.org/tip/37fe5fcb7a5b5235c8b71bf5469ce4c7246e3fab
Author: Zhang, Yanmin <yanmin_zhang@...ux.intel.com>
AuthorDate: Thu, 25 Feb 2010 11:00:51 +0800
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Thu, 25 Feb 2010 12:15:24 +0100
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 <yanmin_zhang@...ux.intel.com>
Acked-by: David S. Miller <davem@...emloft.net>
Cc: <stable@...nel.org> # for .33.x
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
LKML-Reference: <1267066851.1726.9.camel@...alhost>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
tools/perf/util/symbol.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index ee9c37e..320b151 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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists