From: Eduardo Vasconcelos Date: Sat, 25 Apr 2026 06:39:34 +0000 (-0300) Subject: platform/x86: thinkpad_acpi: Remove unneeded goto X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=74ab7c4d73d526bfebc6f3fd7382c6f672d8b912;p=thirdparty%2Fkernel%2Flinux.git platform/x86: thinkpad_acpi: Remove unneeded goto Remove an unneeded goto statement in hotkey_kthread(). Since the function has a single exit location with no cleanup code, the jump provides no benefit. Per the kernel coding style, returning directly is preferred over goto in such case [1]. [1] https://www.kernel.org/doc/html/latest/process/coding-style.html Signed-off-by: Eduardo Vasconcelos Tested-by: Eduardo Vasconcelos Reviewed-by: Mark Pearson Link: https://patch.msgid.link/20260425063936.9360-1-eduardo@eduardovasconcelos.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen --- diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c index e1cee42a1683e..d4ed6f1216f20 100644 --- a/drivers/platform/x86/lenovo/thinkpad_acpi.c +++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c @@ -2469,7 +2469,7 @@ static int hotkey_kthread(void *data) bool was_frozen; if (tpacpi_lifecycle == TPACPI_LIFE_EXITING) - goto exit; + return 0; set_freezable(); @@ -2526,7 +2526,6 @@ static int hotkey_kthread(void *data) si ^= 1; } -exit: return 0; }