mtd: nandsim: fix free of NULL pointer
authorshengyong <shengyong1@huawei.com>
Thu, 25 Jun 2015 02:23:13 +0000 (02:23 +0000)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 6 Jul 2015 22:20:09 +0000 (15:20 -0700)
commitec7478fa173f65e5ee5fd2ba42c59ca3e700027b
tree438bfe81fa168f8fcea231bcf85e48cf03775589
parent83dcf400be7165af938dbd6b8ce6805c754701db
mtd: nandsim: fix free of NULL pointer

If allocating ns->nand_pages_slab fails, do not try to destroy it when
cleaning up nandsim resources.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nandsim.c