[PATCH] arch:x86:coco:sev: Initialize ctxt variable

From: Ragavendra
Date: Thu Nov 14 2024 - 19:36:05 EST


Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as
it was not initialized.

Fixes: 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Signed-off-by: Ragavendra Nagraj <ragavendra.bn@xxxxxxxxx>
---
arch/x86/coco/sev/shared.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/coco/sev/shared.c b/arch/x86/coco/sev/shared.c
index 71de53194089..a0fe7fc9bdc7 100644
--- a/arch/x86/coco/sev/shared.c
+++ b/arch/x86/coco/sev/shared.c
@@ -335,7 +335,7 @@ static int svsm_perform_msr_protocol(struct svsm_call *call)

static int svsm_perform_ghcb_protocol(struct ghcb *ghcb, struct svsm_call *call)
{
- struct es_em_ctxt ctxt;
+ struct es_em_ctxt ctxt = NULL;
u8 pending = 0;

vc_ghcb_invalidate(ghcb);
--
2.46.1