From: Deming Wang <wangdeming@inspur.com>
Date: Fri, 4 Nov 2022 02:38:18 +0000 (-0400)
Subject: zsmalloc: replace IS_ERR() with IS_ERR_VALUE()
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=65917b538bcc4d8c0d8e199a6f7b7426acf13d58;p=linux.git

zsmalloc: replace IS_ERR() with IS_ERR_VALUE()

Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE()
instead.

Link: https://lkml.kernel.org/r/20221104023818.1728-1-wangdeming@inspur.com
Signed-off-by: Deming Wang <wangdeming@inspur.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index d03941cace2c4..b52b7bb88b522 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -387,7 +387,7 @@ static int zs_zpool_malloc(void *pool, size_t size, gfp_t gfp,
 {
 	*handle = zs_malloc(pool, size, gfp);
 
-	if (IS_ERR((void *)(*handle)))
+	if (IS_ERR_VALUE(*handle))
 		return PTR_ERR((void *)*handle);
 	return 0;
 }