Re: [RFC v1 05/14] bus1: util - pool utility library
From: Peter Zijlstra
Date: Thu Oct 27 2016 - 09:51:41 EST
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);