aio: replace IS_ERR() with IS_ERR_VALUE()

Message ID 20221115031644.2341-1-liubo03@inspur.com
State New
Headers
Series aio: replace IS_ERR() with IS_ERR_VALUE() |

Commit Message

Bo Liu Nov. 15, 2022, 3:16 a.m. UTC
  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(-)
  

Comments

Chaitanya Kulkarni Nov. 15, 2022, 7:34 p.m. UTC | #1
On 11/14/22 19:16, Bo Liu wrote:
> Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE()
> instead.
> 
> Signed-off-by: Bo Liu <liubo03@inspur.com>
> ---
>

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
  

Patch

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;