Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
fix: Fixing complaint from golancilint for SQA (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
adorney99 authored and pbrownlow7 committed Aug 4, 2023
1 parent 35aecb0 commit ef33d59
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion controllers/powerprofile_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ func (r *PowerProfileReconciler) Reconcile(c context.Context, req ctrl.Request)
// everything has already been removed. Finally, we remove the Extended Resources from the Node
// first we make sure the profile isn't the one used by the shared pool
if r.PowerLibrary.GetSharedPool().GetPowerProfile() != nil && req.Name == r.PowerLibrary.GetSharedPool().GetPowerProfile().Name() {
r.PowerLibrary.GetSharedPool().SetPowerProfile(nil)
err := r.PowerLibrary.GetSharedPool().SetPowerProfile(nil)
if err != nil {
logger.Error(err, "error setting nil profile")
return ctrl.Result{}, err
}
return ctrl.Result{}, nil
}
pool := r.PowerLibrary.GetExclusivePool(req.Name)
Expand Down

0 comments on commit ef33d59

Please sign in to comment.