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

Commit 97abfde1 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Mike Snitzer
Browse files

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: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 30bba430
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -3548,9 +3548,7 @@ 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);
	if (ic->bufio)
		dm_bufio_client_destroy(ic->bufio);