[tip: x86/sev] x86/sev: Simplify the code by removing unnecessary 'else' statement

tip-bot2 for Peng Hao posted 1 patch 9 months ago
arch/x86/coco/sev/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[tip: x86/sev] x86/sev: Simplify the code by removing unnecessary 'else' statement
Posted by tip-bot2 for Peng Hao 9 months ago
The following commit has been merged into the x86/sev branch of tip:

Commit-ID:     f0373cc0907ca7918266a507d6b3b5d75ee839ba
Gitweb:        https://git.kernel.org/tip/f0373cc0907ca7918266a507d6b3b5d75ee839ba
Author:        Peng Hao <flyingpeng@tencent.com>
AuthorDate:    Fri, 14 Mar 2025 20:19:53 +08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 17 Mar 2025 09:02:45 +01:00

x86/sev: Simplify the code by removing unnecessary 'else' statement

No need for an 'else' statement after a 'return'.

[ mingo: Clarified the changelog ]

Signed-off-by: Peng Hao <flyingpeng@tencent.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org
---
 arch/x86/coco/sev/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c
index 82492ef..4e8b800 100644
--- a/arch/x86/coco/sev/core.c
+++ b/arch/x86/coco/sev/core.c
@@ -1482,8 +1482,7 @@ static enum es_result vc_handle_msr(struct ghcb *ghcb, struct es_em_ctxt *ctxt)
 	case MSR_AMD64_GUEST_TSC_FREQ:
 		if (sev_status & MSR_AMD64_SNP_SECURE_TSC)
 			return __vc_handle_secure_tsc_msrs(regs, write);
-		else
-			break;
+		break;
 	default:
 		break;
 	}