Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b14a5c5 authored by Tim Hansen's avatar Tim Hansen Committed by Jens Axboe
Browse files

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 77ede3a0 (current head as of this
patch).

Reviewed-by: default avatarKyle Fortin <kyle.fortin@oracle.com>
Acked-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarTim Hansen <devtimhansen@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 775d3a35
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -485,10 +485,7 @@ 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);
}
EXPORT_SYMBOL(bioset_integrity_free);