Hi Krzysztof,

...

> -     if (overflows_type(size / PAGE_SIZE, page_count))
> -             return -E2BIG;
> -
> -     page_count = size / PAGE_SIZE;
> -     /*
> -      * If there's no chance of allocating enough pages for the whole
> -      * object, bail early.
> -      */
> -     if (size > resource_size(&mr->region))
> -             return -ENOMEM;
> +     ret = validate_set_page_count(size, &page_count, mr);
> +     if (ret < 0)

this can be "if (ret)". Otherwise:

Reviewed-by: Andi Shyti <[email protected]>

Thanks,
Andi

> +             return ret;

Reply via email to