Skip to content

Commit 469ce4b

Browse files
Remove ineffective if assignment on controller
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
1 parent c613536 commit 469ce4b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

controllers/performanceprofile_controller.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (r *PerformanceProfileReconciler) SetupWithManager(mgr ctrl.Manager) error
117117
},
118118
}
119119

120-
err := ctrl.NewControllerManagedBy(mgr).
120+
return ctrl.NewControllerManagedBy(mgr).
121121
For(&performancev2.PerformanceProfile{}).
122122
Owns(&mcov1.MachineConfig{}, builder.WithPredicates(p)).
123123
Owns(&mcov1.KubeletConfig{}, builder.WithPredicates(kubeletPredicates)).
@@ -133,10 +133,6 @@ func (r *PerformanceProfileReconciler) SetupWithManager(mgr ctrl.Manager) error
133133
builder.WithPredicates(tunedProfilePredicates),
134134
).
135135
Complete(r)
136-
if err != nil {
137-
return err
138-
}
139-
return nil
140136
}
141137

142138
func (r *PerformanceProfileReconciler) mcpToPerformanceProfile(mcpObj client.Object) []reconcile.Request {

0 commit comments

Comments
 (0)