From: Tim Hansen <devtimhansen@gmail.com>
To: axboe@kernel.dk
Cc: devtimhansen@gmail.com, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, alexander.levin@one.verizon.com
Subject: [PATCH] block: remove unnecessary NULL checks in bioset_integrity_free()
Date: Thu, 5 Oct 2017 14:09:20 -0400 [thread overview]
Message-ID: <20171005180920.GA121296@debian> (raw)
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).
Signed-off-by: Tim Hansen <devtimhansen@gmail.com>
---
block/bio-integrity.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 5df3290..23b42e8 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);
--
2.1.4
next reply other threads:[~2017-10-05 18:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 18:09 Tim Hansen [this message]
2017-10-06 16:00 ` [PATCH] block: remove unnecessary NULL checks in bioset_integrity_free() Kyle Fortin
2017-10-06 16:00 ` Kyle Fortin
2017-10-06 18:40 ` Martin K. Petersen
2017-10-06 19:04 ` Jens Axboe
2017-10-06 22:26 ` Tim Hansen
2017-10-09 18:34 ` Kyle Fortin
2017-10-09 18:34 ` Kyle Fortin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171005180920.GA121296@debian \
--to=devtimhansen@gmail.com \
--cc=alexander.levin@one.verizon.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.