diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-11-04 23:56:50 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-11-04 23:56:50 -0500 |
commit | 8820002c18cd3167d2800c002f13d78fa0325402 (patch) | |
tree | 8896bff3fb02dc5b0ae205a2396f5858b16296e0 /arch/sh/kernel/perf_event.c | |
parent | b6d0137d6156db54a9e6ff74458ed4342a45abb5 (diff) |
sh: perf events: Fix up uninitialized variable warning.
'config' can be unintialized, and although it's not really an error, it
still manages to trigger the -Werror with certain toolchains. Initialize
it early to shut up gcc.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/perf_event.c')
-rw-r--r-- | arch/sh/kernel/perf_event.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/sh/kernel/perf_event.c b/arch/sh/kernel/perf_event.c index 4449f0ac9bf8..7ff0943e7a08 100644 --- a/arch/sh/kernel/perf_event.c +++ b/arch/sh/kernel/perf_event.c | |||
@@ -103,7 +103,7 @@ static int __hw_perf_event_init(struct perf_event *event) | |||
103 | { | 103 | { |
104 | struct perf_event_attr *attr = &event->attr; | 104 | struct perf_event_attr *attr = &event->attr; |
105 | struct hw_perf_event *hwc = &event->hw; | 105 | struct hw_perf_event *hwc = &event->hw; |
106 | int config; | 106 | int config = -1; |
107 | int err; | 107 | int err; |
108 | 108 | ||
109 | if (!sh_pmu_initialized()) | 109 | if (!sh_pmu_initialized()) |
@@ -155,8 +155,6 @@ static int __hw_perf_event_init(struct perf_event *event) | |||
155 | 155 | ||
156 | config = sh_pmu->event_map(attr->config); | 156 | config = sh_pmu->event_map(attr->config); |
157 | break; | 157 | break; |
158 | default: | ||
159 | return -EINVAL; | ||
160 | } | 158 | } |
161 | 159 | ||
162 | if (config == -1) | 160 | if (config == -1) |