summaryrefslogtreecommitdiff
path: root/drivers/virt
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-04-14 18:04:17 +0800
committerBorislav Petkov <bp@suse.de>2022-04-14 13:53:35 +0200
commit101826e02ac6c829bf4e768295e79ae9c37b4b2a (patch)
treec5831be4756047be9cfb5ab6f5abee145d08cc90 /drivers/virt
parente50abbf788c239d529f9ab81e325f8e8f8432c9d (diff)
virt: sevguest: Fix bool function returning negative value
The function enc_payload() is wrongly declared bool but returns an integer value. Correct it. [ bp: Massage commit message. ] Fixes: fce96cf04430 ("virt: Add SEV-SNP guest driver") Signed-off-by: Haowen Bai <baihaowen@meizu.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/1649930657-10837-1-git-send-email-baihaowen@meizu.com
Diffstat (limited to 'drivers/virt')
-rw-r--r--drivers/virt/coco/sevguest/sevguest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virt/coco/sevguest/sevguest.c b/drivers/virt/coco/sevguest/sevguest.c
index aaa6134d1d40..15f069ec8f0b 100644
--- a/drivers/virt/coco/sevguest/sevguest.c
+++ b/drivers/virt/coco/sevguest/sevguest.c
@@ -276,7 +276,7 @@ static int verify_and_dec_payload(struct snp_guest_dev *snp_dev, void *payload,
return dec_payload(snp_dev, resp, payload, resp_hdr->msg_sz + crypto->a_len);
}
-static bool enc_payload(struct snp_guest_dev *snp_dev, u64 seqno, int version, u8 type,
+static int enc_payload(struct snp_guest_dev *snp_dev, u64 seqno, int version, u8 type,
void *payload, size_t sz)
{
struct snp_guest_msg *req = snp_dev->request;