From: Tim Hansen Date: Fri, 6 Oct 2017 18:45:13 +0000 (-0400) Subject: block/bio: Remove null checks before mempool_destroy in bioset_free X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4078def82f352cf5007691635da290a109511bc5;p=linux.git block/bio: Remove null checks before mempool_destroy in bioset_free This patch removes redundant checks for null values on bio_pool and bvec_pool. Found using make coccicheck M=block/ on linux-net tree on the next-20170929 tag. Signed-off-by: Tim Hansen Signed-off-by: Jens Axboe --- diff --git a/block/bio.c b/block/bio.c index 8338304ea2563..bf0dbe8f78f8e 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1928,11 +1928,8 @@ void bioset_free(struct bio_set *bs) if (bs->rescue_workqueue) destroy_workqueue(bs->rescue_workqueue); - if (bs->bio_pool) - mempool_destroy(bs->bio_pool); - - if (bs->bvec_pool) - mempool_destroy(bs->bvec_pool); + mempool_destroy(bs->bio_pool); + mempool_destroy(bs->bvec_pool); bioset_integrity_free(bs); bio_put_slab(bs);