提交 37fe5fcb 编写于 作者: Z Zhang, Yanmin 提交者: Ingo Molnar

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: NZhang Yanmin <yanmin_zhang@linux.intel.com>
Acked-by: NDavid S. Miller <davem@davemloft.net>
Cc: <stable@kernel.org> # for .33.x
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1267066851.1726.9.camel@localhost>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 c2fbaa4b
...@@ -527,7 +527,7 @@ static int dso__split_kallsyms(struct dso *self, struct map *map, ...@@ -527,7 +527,7 @@ static int dso__split_kallsyms(struct dso *self, struct map *map,
return -1; return -1;
curr_map = map__new2(pos->start, dso, map->type); curr_map = map__new2(pos->start, dso, map->type);
if (map == NULL) { if (curr_map == NULL) {
dso__delete(dso); dso__delete(dso);
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册