diff options
author | Minghao Chi <[email protected]> | 2022-01-10 01:29:54 +0000 |
---|---|---|
committer | Matt Turner <[email protected]> | 2023-02-14 12:36:10 -0500 |
commit | d7cf43edebe577c58c7858cf61b03d618d4336cf (patch) | |
tree | 1b1850b15e499d15b1e37cdd7cdf159a8dcd16d4 | |
parent | 019f48dc8eba723d2201679b804f4600e816604a (diff) |
alpha: remove redundant err variable
Return value from __hw_perf_event_init() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
Signed-off-by: CGEL ZTE <[email protected]>
Signed-off-by: Matt Turner <[email protected]>
-rw-r--r-- | arch/alpha/kernel/perf_event.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c index efcf7321701b..ccdb508c1516 100644 --- a/arch/alpha/kernel/perf_event.c +++ b/arch/alpha/kernel/perf_event.c @@ -689,8 +689,6 @@ static int __hw_perf_event_init(struct perf_event *event) */ static int alpha_pmu_event_init(struct perf_event *event) { - int err; - /* does not support taken branch sampling */ if (has_branch_stack(event)) return -EOPNOTSUPP; @@ -709,9 +707,7 @@ static int alpha_pmu_event_init(struct perf_event *event) return -ENODEV; /* Do the real initialisation work. */ - err = __hw_perf_event_init(event); - - return err; + return __hw_perf_event_init(event); } /* |