summaryrefslogtreecommitdiff
path: root/drivers/virt
diff options
context:
space:
mode:
authorBorislav Petkov (AMD) <bp@alien8.de>2023-02-15 11:43:43 +0100
committerBorislav Petkov (AMD) <bp@alien8.de>2023-03-13 11:33:41 +0100
commitc5a338274bdb894f088767bea856be344d0ccaef (patch)
treeea6cc65bb355a788c4b433c75822fa693fa903a3 /drivers/virt
parent970ab823743fb54b42002ec76c51481f67436444 (diff)
virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request()
Call the function directly instead. No functional changes. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/r/20230307192449.24732-5-bp@alien8.de
Diffstat (limited to 'drivers/virt')
-rw-r--r--drivers/virt/coco/sev-guest/sev-guest.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/virt/coco/sev-guest/sev-guest.c b/drivers/virt/coco/sev-guest/sev-guest.c
index e61db0b15b7a..a51bd4afd5ab 100644
--- a/drivers/virt/coco/sev-guest/sev-guest.c
+++ b/drivers/virt/coco/sev-guest/sev-guest.c
@@ -405,7 +405,8 @@ retry_request:
dev_alert(snp_dev->dev,
"Detected error from ASP request. rc: %d, fw_err: %llu\n",
rc, *fw_err);
- goto disable_vmpck;
+ snp_disable_vmpck(snp_dev);
+ return rc;
}
rc = verify_and_dec_payload(snp_dev, resp_buf, resp_sz);
@@ -413,14 +414,11 @@ retry_request:
dev_alert(snp_dev->dev,
"Detected unexpected decode failure from ASP. rc: %d\n",
rc);
- goto disable_vmpck;
+ snp_disable_vmpck(snp_dev);
+ return rc;
}
return 0;
-
-disable_vmpck:
- snp_disable_vmpck(snp_dev);
- return rc;
}
static int get_report(struct snp_guest_dev *snp_dev, struct snp_guest_request_ioctl *arg)