mtd: rawnand: nandsim: Use an additional label when freeing the nandsim object

Cosmetic change to give a meaning to all labels in this complicated
error path.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200525085851.17682-13-miquel.raynal@bootlin.com
This commit is contained in:
Miquel Raynal 2020-05-25 10:58:46 +02:00
parent d6e4fd5224
commit 82503f8412

View File

@ -2387,16 +2387,16 @@ static int __init ns_init_module(void)
ret = nand_create_bbt(chip);
if (ret)
goto err_exit;
goto free_ns_object;
ret = ns_parse_badblocks(ns, nsmtd);
if (ret)
goto err_exit;
goto free_ns_object;
/* Register NAND partitions */
ret = mtd_device_register(nsmtd, &ns->partitions[0], ns->nbparts);
if (ret)
goto err_exit;
goto free_ns_object;
ret = ns_debugfs_create(ns);
if (ret)
@ -2407,6 +2407,7 @@ static int __init ns_init_module(void)
unregister_mtd:
WARN_ON(mtd_device_unregister(nsmtd));
err_exit:
free_ns_object:
ns_free(ns);
nand_cleanup(chip);
error: