On Fri, 2018-12-14 at 10:13 -0800, Matthew Wilcox wrote:
> On Fri, Dec 14, 2018 at 10:07:18AM -0800, Roman Gushchin wrote:
> > +/*
> > + * Allocate a region of KVA of the specified size and alignment, within the
> > + * vstart and vend.
> > + */
> > +static struct vmap_area *alloc_vmap_area(unsigned long size,
> > +                                    unsigned long align,
> > +                                    unsigned long vstart,
> > +                                    unsigned long vend,
> > +                                    int node, gfp_t gfp_mask)
> > +{
> > +   struct vmap_area *va;
> > +   int ret;
> > +
> > +   va = kmalloc_node(sizeof(struct vmap_area),
> > +                   gfp_mask & GFP_RECLAIM_MASK, node);
> > +   if (unlikely(!va))
> > +           return ERR_PTR(-ENOMEM);
> > +
> > +   ret = init_vmap_area(va, size, align, vstart, vend, node, gfp_mask);
> > +   if (ret) {
> > +           kfree(va);
> > +           return ERR_PTR(ret);
> > +   }
> > +
> > +   return va;
> >  }
> >  
> > +
> 
> Another spurious blank line?

I don't think so.

I think it is the better style to separate
the error return from the normal return.

> With these two fixed,
> Reviewed-by: Matthew Wilcox <[email protected]>
> 

Reply via email to