mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
b6d0137d61
commit
8820002c18
1 changed files with 1 additions and 3 deletions
|
@ -103,7 +103,7 @@ static int __hw_perf_event_init(struct perf_event *event)
|
|||
{
|
||||
struct perf_event_attr *attr = &event->attr;
|
||||
struct hw_perf_event *hwc = &event->hw;
|
||||
int config;
|
||||
int config = -1;
|
||||
int err;
|
||||
|
||||
if (!sh_pmu_initialized())
|
||||
|
@ -155,8 +155,6 @@ static int __hw_perf_event_init(struct perf_event *event)
|
|||
|
||||
config = sh_pmu->event_map(attr->config);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (config == -1)
|
||||
|
|
Loading…
Reference in a new issue