Commit 101826e0 authored by Haowen Bai's avatar Haowen Bai Committed by Borislav Petkov

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: fce96cf0 ("virt: Add SEV-SNP guest driver")
Signed-off-by: default avatarHaowen Bai <baihaowen@meizu.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/1649930657-10837-1-git-send-email-baihaowen@meizu.com
parent e50abbf7
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment