lkml.org 
[lkml]   [2022]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] aio: replace IS_ERR() with IS_ERR_VALUE()
Date
Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE()
instead.

Signed-off-by: Bo Liu <liubo03@inspur.com>
---
fs/aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/aio.c b/fs/aio.c
index 5b2ff20ad322..978bbfb8dcac 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -556,7 +556,7 @@ static int aio_setup_ring(struct kioctx *ctx, unsigned int nr_events)
PROT_READ | PROT_WRITE,
MAP_SHARED, 0, &unused, NULL);
mmap_write_unlock(mm);
- if (IS_ERR((void *)ctx->mmap_base)) {
+ if (IS_ERR_VALUE(ctx->mmap_base)) {
ctx->mmap_size = 0;
aio_free_ring(ctx);
return -ENOMEM;
--
2.27.0
\
 
 \ /
  Last update: 2022-11-15 04:18    [W:0.037 / U:3.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site