From 210f61949f019b171d945c251f5ae10aebf7e92e Mon Sep 17 00:00:00 2001 From: backslashxx <118538522+backslashxx@users.noreply.github.com> Date: Tue, 24 Jun 2025 12:30:14 +0800 Subject: [PATCH] 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> --- kernel/apk_sign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/apk_sign.c b/kernel/apk_sign.c index 7bc4493e..ad32ef61 100644 --- a/kernel/apk_sign.c +++ b/kernel/apk_sign.c @@ -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; }