[PATCH] md: remove unneeded NULL checks before kfree
This patch removes some unneeded checks of pointers being NULL before calling kfree() on them. kfree() handles NULL pointers just fine, checking first is pointless. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
8a5e9cf1d6
commit
990a8baf56
@ -704,8 +704,7 @@ static void crypt_dtr(struct dm_target *ti)
|
||||
mempool_destroy(cc->page_pool);
|
||||
mempool_destroy(cc->io_pool);
|
||||
|
||||
if (cc->iv_mode)
|
||||
kfree(cc->iv_mode);
|
||||
kfree(cc->iv_mode);
|
||||
if (cc->iv_gen_ops && cc->iv_gen_ops->dtr)
|
||||
cc->iv_gen_ops->dtr(cc);
|
||||
crypto_free_tfm(cc->tfm);
|
||||
|
Reference in New Issue
Block a user