From: Frederic Weisbecker Date: Sat, 8 Aug 2009 02:26:35 +0000 (+0200) Subject: perf_counter: Work around gcc warning by initializing tracepoint record unconditionally X-Git-Tag: v2.6.31-rc6~19^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10b8e3066066708f304e0fc5cfe658e05abf943d;p=pandora-kernel.git perf_counter: Work around gcc warning by initializing tracepoint record unconditionally Despite that the tracepoint record is always present when the PERF_SAMPLE_TP_RECORD flag is set, gcc raises a warning, thinking it might not be initialized: kernel/perf_counter.c: In function ‘perf_counter_output’: kernel/perf_counter.c:2650: warning: ‘tp’ may be used uninitialized in this function Then, initialize it to NULL and always check if it's not NULL before dereference it. Reported-by: Ingo Molnar Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Mike Galbraith Cc: Paul Mackerras LKML-Reference: <1249698400-5441-2-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed