Skip to content

Commit

Permalink
virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_r…
Browse files Browse the repository at this point in the history
…equest()

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
  • Loading branch information
Borislav Petkov (AMD) committed Mar 13, 2023
1 parent 970ab82 commit c5a3382
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/virt/coco/sev-guest/sev-guest.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,22 +405,20 @@ static int handle_guest_request(struct snp_guest_dev *snp_dev, u64 exit_code, in
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);
if (rc) {
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)
Expand Down

0 comments on commit c5a3382

Please sign in to comment.