summaryrefslogtreecommitdiffstats
path: root/block/bio-integrity.c
diff options
context:
space:
mode:
authorTim Hansen <devtimhansen@gmail.com>2017-10-05 20:09:20 +0200
committerJens Axboe <axboe@kernel.dk>2017-10-06 21:03:12 +0200
commit4b14a5c5d57f4fd6929db3427ba4d7c3775b4680 (patch)
treef4897492ababa6c43169489e3fc10985983efa87 /block/bio-integrity.c
parentbacking-dev: kill unused pdflush_proc_obsolete() (diff)
downloadlinux-4b14a5c5d57f4fd6929db3427ba4d7c3775b4680.tar.xz
linux-4b14a5c5d57f4fd6929db3427ba4d7c3775b4680.zip
block: remove unnecessary NULL checks in bioset_integrity_free()
mempool_destroy() already checks for a NULL value being passed in, this eliminates duplicate checks. This was caught by running make coccicheck M=block/ on linus' tree on commit 77ede3a014a32746002f7889211f0cecf4803163 (current head as of this patch). Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Tim Hansen <devtimhansen@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio-integrity.c')
-rw-r--r--block/bio-integrity.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 5df32907ff3b..23b42e8aa03e 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -485,11 +485,8 @@ EXPORT_SYMBOL(bioset_integrity_create);
void bioset_integrity_free(struct bio_set *bs)
{
- if (bs->bio_integrity_pool)
- mempool_destroy(bs->bio_integrity_pool);
-
- if (bs->bvec_integrity_pool)
- mempool_destroy(bs->bvec_integrity_pool);
+ mempool_destroy(bs->bio_integrity_pool);
+ mempool_destroy(bs->bvec_integrity_pool);
}
EXPORT_SYMBOL(bioset_integrity_free);