From: Dan Carpenter Date: Tue, 24 Aug 2021 11:36:54 +0000 (+0300) Subject: platform/x86: asus-wmi: Delete impossible condition X-Git-Tag: v5.15-rc1~114^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b72067c64b226fc42fd5262cfbb675ec68fb4934;p=thirdparty%2Fkernel%2Flinux.git platform/x86: asus-wmi: Delete impossible condition 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 Link: https://lore.kernel.org/r/20210824113654.GA31143@kili Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index cc58118440120..679429d412644 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -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;