From: Borislav Petkov (AMD) Date: Wed, 15 Feb 2023 10:43:43 +0000 (+0100) Subject: virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request() X-Git-Tag: baikal/mips/sdk6.1~10 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=d2f234ff1658fb00cc60f14c3ade4167d8c0c3e9;p=kernel.git virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request() commit ebc750614a386d9c0d7fbb4bb53711bd00e7d406 upstream. Call the function directly instead. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20230307192449.24732-5-bp@alien8.de Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/virt/coco/sev-guest/sev-guest.c b/drivers/virt/coco/sev-guest/sev-guest.c index 2fac7f7121583..fbbc0da15a917 100644 --- a/drivers/virt/coco/sev-guest/sev-guest.c +++ b/drivers/virt/coco/sev-guest/sev-guest.c @@ -407,7 +407,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); @@ -415,14 +416,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)