From 5587165f751855749a8e0d34ed9db335b2dbfb85 Mon Sep 17 00:00:00 2001 From: erwinpan1 Date: Fri, 12 Jan 2024 22:58:38 +0800 Subject: [PATCH] When decrease, we don't need to check speedMax --- examples/chef/common/chef-fan-control-manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chef/common/chef-fan-control-manager.cpp b/examples/chef/common/chef-fan-control-manager.cpp index db267f4fa29099..7f3c8913e1ea71 100644 --- a/examples/chef/common/chef-fan-control-manager.cpp +++ b/examples/chef/common/chef-fan-control-manager.cpp @@ -117,7 +117,7 @@ Status ChefFanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWra { newSpeedSetting = kLowestSpeed; } - else if ((speedSetting.Value() > 1) && (speedSetting.Value() <= speedMax)) + else if (speedSetting.Value() > 1) { newSpeedSetting = static_cast(speedSetting.Value() - 1); }