@@ -276,8 +276,7 @@ func (k *Kontroller) process() {
276276 // fix them.
277277 klog .V (4 ).Info ("Cleaning up node state" )
278278
279- err := k .cleanupState ()
280- if err != nil {
279+ if err := k .cleanupState (); err != nil {
281280 klog .Errorf ("Failed to cleanup node state: %v" , err )
282281
283282 return
@@ -289,8 +288,7 @@ func (k *Kontroller) process() {
289288 // the reboot has completed.
290289 klog .V (4 ).Info ("Checking if configured after-reboot annotations are set to true" )
291290
292- err = k .checkAfterReboot ()
293- if err != nil {
291+ if err := k .checkAfterReboot (); err != nil {
294292 klog .Errorf ("Failed to check after reboot: %v" , err )
295293
296294 return
@@ -300,8 +298,7 @@ func (k *Kontroller) process() {
300298 // remove after-reboot annotations and add the after-reboot=true label.
301299 klog .V (4 ).Info ("Labeling rebooted nodes with after-reboot label" )
302300
303- err = k .markAfterReboot ()
304- if err != nil {
301+ if err := k .markAfterReboot (); err != nil {
305302 klog .Errorf ("Failed to update recently rebooted nodes: %v" , err )
306303
307304 return
@@ -313,8 +310,7 @@ func (k *Kontroller) process() {
313310 // time to reboot.
314311 klog .V (4 ).Info ("Checking if configured before-reboot annotations are set to true" )
315312
316- err = k .checkBeforeReboot ()
317- if err != nil {
313+ if err := k .checkBeforeReboot (); err != nil {
318314 klog .Errorf ("Failed to check before reboot: %v" , err )
319315
320316 return
@@ -324,8 +320,7 @@ func (k *Kontroller) process() {
324320 // annotations and add the before-reboot=true label.
325321 klog .V (4 ).Info ("Labeling rebootable nodes with before-reboot label" )
326322
327- err = k .markBeforeReboot ()
328- if err != nil {
323+ if err := k .markBeforeReboot (); err != nil {
329324 klog .Errorf ("Failed to update rebootable nodes: %v" , err )
330325
331326 return
0 commit comments