Skip to contentSkip to conversation

aio: Replace IS_ERR() with IS_ERR_VALUE()

PATCH New [email protected] 1 participant 1 message Oct 20, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aio: Replace IS_ERR() with IS_ERR_VALUE()

From: ye xingchen <[email protected]>

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

---
 fs/aio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/aio.c +1 -1
index 5b2ff20ad322..978bbfb8dcac 100644
@@ -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;
Signature · 1 line
2.25.1