* [PATCH] arch/alpha/kernel: remove redundant err variable
@ 2022-01-10 1:29 cgel.zte
0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2022-01-10 1:29 UTC (permalink / raw)
To: peterz
Cc: mingo, acme, mark.rutland, alexander.shishkin, jolsa, namhyung,
rth, ink, mattst88, linux-perf-users, linux-kernel, linux-alpha,
Minghao Chi, Zeal Robot, CGEL ZTE
From: Minghao Chi <chi.minghao@zte.com.cn>
Return value from __hw_perf_event_init() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
arch/alpha/kernel/perf_event.c | 6 +-----
1 file changed, 1 insertion(+), 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);
}
/*
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-10 1:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10 1:29 [PATCH] arch/alpha/kernel: remove redundant err variable cgel.zte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®