Skip to contentSkip to conversation

arch/alpha/kernel: remove redundant err variable

PATCH New [email protected] 1 participant 1 message Jan 10, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/alpha/kernel: remove redundant err variable

From: Minghao Chi <[email protected]>

Return value from __hw_perf_event_init() directly instead of taking this in another redundant variable.

---
 arch/alpha/kernel/perf_event.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/alpha/kernel/perf_event.c +1 -5
index efcf7321701b..ccdb508c1516 100644
@@ -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);
 }
 
 /*
Signature · 1 line
2.25.1