mtd: rawnand: nandsim: Free the allocated device on error in ns_init()
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 25 May 2020 08:58:43 +0000 (10:58 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 31 May 2020 08:53:38 +0000 (10:53 +0200)
commit161246ec066f3eee40feeb02a07992db4c4e86f7
treee142aa8b5fecde42628dce672e4799c7e405d908
parent52bc51c54ef8d8e9358f12666e9f107d9a44f394
mtd: rawnand: nandsim: Free the allocated device on error in ns_init()

The nandsim device is allocated and initialized inside ns_init() by a
call to ns_alloc_device(), free it on error.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200525085851.17682-10-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/nandsim.c