diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2019-04-29 14:57:17 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2019-05-07 16:05:08 -0400 |
commit | 97abfde17ae011525755f50242ed447ecebdbab5 (patch) | |
tree | cf9c961a41b4e4c8041185b143e4ca9a4cf7900d /drivers/md/dm-integrity.c | |
parent | 30bba430ddf737978e40561198693ba91386dac1 (diff) |
dm integrity: don't check null pointer before kvfree and vfree
The functions kfree, vfree and kvfree do nothing if we pass a NULL
pointer to them. So we don't need to test the pointer for NULL.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-integrity.c')
-rw-r--r-- | drivers/md/dm-integrity.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 7848ef019880..1e73422c04bc 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -3548,10 +3548,8 @@ static void dm_integrity_dtr(struct dm_target *ti) destroy_workqueue(ic->writer_wq); if (ic->recalc_wq) destroy_workqueue(ic->recalc_wq); - if (ic->recalc_buffer) - vfree(ic->recalc_buffer); - if (ic->recalc_tags) - kvfree(ic->recalc_tags); + vfree(ic->recalc_buffer); + kvfree(ic->recalc_tags); if (ic->bufio) dm_bufio_client_destroy(ic->bufio); mempool_exit(&ic->journal_io_mempool); |