On Wed, Oct 26, 2016 at 09:18:01PM +0200, David Herrmann wrote: > +static struct bus1_pool_slice * > +bus1_pool_slice_free(struct bus1_pool_slice *slice) > +{ > + if (!slice) > + return NULL; > + > + kfree(slice); > + > + return NULL; > +}
The return value is never used. Which reduces the entire thing to: kfree(slice); since kfree() already accepts a NULL. > + bus1_pool_slice_free(slice); > + bus1_pool_slice_free(slice); > + bus1_pool_slice_free(ps);