crypto: ccp - Use int type to store negative error codes

Change the 'ret' variable in __sev_do_cmd_locked() from unsigned int to
int, as it needs to store negative error codes.

No effect on runtime.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Qianfeng Rong
2025-09-03 21:25:35 +08:00
committed by Herbert Xu
parent 2b0dc40ac6
commit e002780c14

View File

@@ -848,9 +848,10 @@ static int __sev_do_cmd_locked(int cmd, void *data, int *psp_ret)
struct sev_device *sev;
unsigned int cmdbuff_hi, cmdbuff_lo;
unsigned int phys_lsb, phys_msb;
unsigned int reg, ret = 0;
unsigned int reg;
void *cmd_buf;
int buf_len;
int ret = 0;
if (!psp || !psp->sev_data)
return -ENODEV;