zsmalloc: replace IS_ERR() with IS_ERR_VALUE()
authorDeming Wang <wangdeming@inspur.com>
Fri, 4 Nov 2022 02:38:18 +0000 (22:38 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 30 Nov 2022 23:58:46 +0000 (15:58 -0800)
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>
mm/zsmalloc.c

index d03941c..b52b7bb 100644 (file)
@@ -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;
 }