diff options
author | Will Deacon <will.deacon@arm.com> | 2010-11-04 20:23:50 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-11-07 19:12:38 +0300 |
commit | c3b291d98878a5f25fee56255bcfa420e85dff59 (patch) | |
tree | 9e3a996e5985fb98434ea6c1103a94f305707cb3 /arch | |
parent | d33aadbf8e9ba0b844c2a4a03723969c913ab03a (diff) | |
download | linux-c3b291d98878a5f25fee56255bcfa420e85dff59.tar.xz |
ARM: 6469/1: perf-events: squash compiler warning
armv7_pmnc_counter_has_overflowed can return uninitialised data
if an invalid counter is specified.
This patch fixes the code to return 0 in this case, which squashes
the compiler warning from GCC 4.5.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/perf_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 49643b1467e6..07a50357492a 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -1749,7 +1749,7 @@ static inline int armv7_pmnc_has_overflowed(unsigned long pmnc) static inline int armv7_pmnc_counter_has_overflowed(unsigned long pmnc, enum armv7_counters counter) { - int ret; + int ret = 0; if (counter == ARMV7_CYCLE_COUNTER) ret = pmnc & ARMV7_FLAG_C; |