Skip to content

Commit

Permalink
Merge pull request #548 from mlguerrero12/fixerroroverride
Browse files Browse the repository at this point in the history
Fix error overwrite for setSriovNumVfs
  • Loading branch information
zeeke authored Nov 23, 2023
2 parents c54ee95 + 8a435fe commit 6445d38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,11 @@ func configSriovDevice(iface *sriovnetworkv1.Interface, ifaceStatus *sriovnetwor

err = setSriovNumVfs(iface.PciAddress, iface.NumVfs)
if err != nil {
err = RemoveUdevRule(iface.PciAddress)
if err != nil {
return err
log.Log.Error(err, "configSriovDevice(): fail to set NumVfs for device", "device", iface.PciAddress)
errRemove := RemoveUdevRule(iface.PciAddress)
if errRemove != nil {
log.Log.Error(errRemove, "configSriovDevice(): fail to remove udev rule", "device", iface.PciAddress)
}
log.Log.Error(nil, "configSriovDevice(): fail to set NumVfs for device", "device", iface.PciAddress)
return err
}
}
Expand Down

0 comments on commit 6445d38

Please sign in to comment.