summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2020-05-25 11:58:46 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-05-31 11:53:38 +0300
commit82503f8412dfbcaf03e8a72663d2a416131f0113 (patch)
tree48127cbdfce1fad193dd24e7256e03c46bda6785 /drivers/mtd
parentd6e4fd522461f490f49eda81b7e0fba86141ef20 (diff)
downloadlinux-82503f8412dfbcaf03e8a72663d2a416131f0113.tar.xz
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
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/nandsim.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/nandsim.c b/drivers/mtd/nand/raw/nandsim.c
index 127ba2081fe9..a31a8aaab1fe 100644
--- a/drivers/mtd/nand/raw/nandsim.c
+++ b/drivers/mtd/nand/raw/nandsim.c
@@ -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: