Skip to content

Commit

Permalink
fix premature error log
Browse files Browse the repository at this point in the history
  • Loading branch information
markusressel committed May 21, 2022
1 parent d5cd6dd commit f24970f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ func trySetManualPwm(fan fans.Fan) error {
if err != nil {
ui.Error("Unable to set Fan Mode of '%s' to \"%d\": %v", fan.GetId(), fans.ControlModePWM, err)
err = fan.SetPwmEnabled(fans.ControlModeDisabled)
ui.Error("Unable to set Fan Mode of '%s' to \"%d\": %v", fan.GetId(), fans.ControlModeDisabled, err)
if err != nil {
ui.Error("Unable to set Fan Mode of '%s' to \"%d\": %v", fan.GetId(), fans.ControlModeDisabled, err)
}
}
return err
}
Expand Down

0 comments on commit f24970f

Please sign in to comment.