Commit 82503f84 authored by Miquel Raynal's avatar Miquel Raynal

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: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200525085851.17682-13-miquel.raynal@bootlin.com
parent d6e4fd52
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment