All of lore.kernel.org
 help / color / mirror / Atom feed
* Check the right return variable
@ 2010-02-25  3:00 Zhang, Yanmin
  2010-02-25  8:46 ` David Miller
  2010-02-25 11:18 ` [tip:perf/core] perf symbols: " tip-bot for Zhang, Yanmin
  0 siblings, 2 replies; 3+ messages in thread
From: Zhang, Yanmin @ 2010-02-25  3:00 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, LKML

In function dso__split_kallsyms, curr_map saves the return value of
map__new2. So check it instead of var map after the calling returns.

Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>

---

diff -Nraup linux-2.6.33/tools/perf/util/symbol.c linux-2.6.33_perf/tools/perf/util/symbol.c
--- linux-2.6.33/tools/perf/util/symbol.c	2010-02-25 02:52:17.000000000 +0800
+++ linux-2.6.33_perf/tools/perf/util/symbol.c	2010-02-25 10:12:33.000000000 +0800
@@ -503,7 +503,7 @@ static int dso__split_kallsyms(struct ds
 				return -1;
 
 			curr_map = map__new2(pos->start, dso, map->type);
-			if (map == NULL) {
+			if (curr_map == NULL) {
 				dso__delete(dso);
 				return -1;
 			}



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-25 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25  3:00 Check the right return variable Zhang, Yanmin
2010-02-25  8:46 ` David Miller
2010-02-25 11:18 ` [tip:perf/core] perf symbols: " tip-bot for Zhang, Yanmin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.