kernel: apk_sign: fix return check for ksu_sha256

upstream used IS_ERR to check for negative return and that is int,
so correct it.

This is one headache for old compilers.

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
This commit is contained in:
backslashxx
2025-06-24 12:30:14 +08:00
committed by ShirkNeko
parent 5c7241da31
commit 210f61949f

View File

@@ -127,7 +127,7 @@ static bool check_block(struct file *fp, u32 *size4, loff_t *pos, u32 *offset, i
}
ksu_kernel_read_compat(fp, cert, *size4, pos);
unsigned char digest[SHA256_DIGEST_SIZE];
if (IS_ERR(ksu_sha256(cert, *size4, digest))) {
if (ksu_sha256(cert, *size4, digest) < 0 ) {
pr_info("sha256 error\n");
return false;
}