diff options
Diffstat (limited to 'io_uring/kbuf.c')
-rw-r--r-- | io_uring/kbuf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c index d2945c9c812b..c95dc1736dd9 100644 --- a/io_uring/kbuf.c +++ b/io_uring/kbuf.c @@ -657,8 +657,10 @@ static int io_alloc_pbuf_ring(struct io_ring_ctx *ctx, ring_size = reg->ring_entries * sizeof(struct io_uring_buf_ring); bl->buf_ring = io_pages_map(&bl->buf_pages, &bl->buf_nr_pages, ring_size); - if (!bl->buf_ring) + if (IS_ERR(bl->buf_ring)) { + bl->buf_ring = NULL; return -ENOMEM; + } bl->is_buf_ring = 1; bl->is_mmap = 1; |