Skip to content

Commit

Permalink
platform/x86: asus-wmi: Delete impossible condition
Browse files Browse the repository at this point in the history
The "asus->throttle_thermal_policy_mode" variable is a u8 so it can't
be negative.  And we always verify that the value is valid before
setting the policy mode so there is no need to check again here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210824113654.GA31143@kili
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Dan Carpenter authored and Hans de Goede committed Aug 26, 2021
1 parent 8ebcb6c commit b72067c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2179,9 +2179,6 @@ static int platform_profile_get(struct platform_profile_handler *pprof,

tp = asus->throttle_thermal_policy_mode;

if (tp < 0)
return tp;

switch (tp) {
case ASUS_THROTTLE_THERMAL_POLICY_DEFAULT:
*profile = PLATFORM_PROFILE_BALANCED;
Expand Down

0 comments on commit b72067c

Please sign in to comment.