op_ctx->rsvd_page_tables.pages = kcalloc(pt_count,
sizeof(*op_ctx->rsvd_page_tables.pages),
GFP_KERNEL);
- if (!op_ctx->rsvd_page_tables.pages)
+ if (!op_ctx->rsvd_page_tables.pages) {
+ ret = -ENOMEM;
goto err_cleanup;
+ }
ret = kmem_cache_alloc_bulk(pt_cache, GFP_KERNEL, pt_count,
op_ctx->rsvd_page_tables.pages);
op_ctx->rsvd_page_tables.pages = kcalloc(pt_count,
sizeof(*op_ctx->rsvd_page_tables.pages),
GFP_KERNEL);
- if (!op_ctx->rsvd_page_tables.pages)
+ if (!op_ctx->rsvd_page_tables.pages) {
+ ret = -ENOMEM;
goto err_cleanup;
+ }
ret = kmem_cache_alloc_bulk(pt_cache, GFP_KERNEL, pt_count,
op_ctx->rsvd_page_tables.pages);