From fa671646f61182cd18234461a6e65f50c6558695 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 7 Nov 2005 01:01:27 -0800 Subject: [PATCH] kfree cleanup: drivers/mtd This is the drivers/mtd part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/mtd/. Signed-off-by: Jesper Juhl Cc: David Woodhouse Acked-by: Joern Engel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mtd/nand/nand_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/mtd/nand') diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 04e54318bc6a..8e78d7b96a56 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2676,9 +2676,8 @@ void nand_release (struct mtd_info *mtd) /* Deregister the device */ del_mtd_device (mtd); - /* Free bad block table memory, if allocated */ - if (this->bbt) - kfree (this->bbt); + /* Free bad block table memory */ + kfree (this->bbt); /* Buffer allocated by nand_scan ? */ if (this->options & NAND_OOBBUF_ALLOC) kfree (this->oob_buf); -- cgit v1.2.3