[PATCH] virt: sevguest: Fix bool function returning negative value

From: Haowen Bai
Date: Thu Apr 14 2022 - 06:01:31 EST


function enc_payload() is bool but return signedness value.

Signed-off-by: Haowen Bai <baihaowen@xxxxxxxxx>
---
drivers/virt/coco/sevguest/sevguest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/virt/coco/sevguest/sevguest.c b/drivers/virt/coco/sevguest/sevguest.c
index 15afb6ce8d19..07adf3145d76 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;
--
2.7.4