summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/nandsim.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2020-05-25 10:58:48 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-05-31 10:53:38 +0200
commitdc2733dea2be78e03df1fbb5816b59d852b2291c (patch)
treef0fbaddbd5aaae40e147acbc76b3012670cc58f1 /drivers/mtd/nand/raw/nandsim.c
parent5dcb5164b20eaa178dcea9572c8b0dccabef7a25 (diff)
downloadlinux-dc2733dea2be78e03df1fbb5816b59d852b2291c.tar.bz2
mtd: rawnand: nandsim: Fix the label pointing on nand_cleanup()
Drop the generic err_exit. The remaining operation to do from this goto statement is to cleanup the NAND allocations, so rename it. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200525085851.17682-15-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/raw/nandsim.c')
-rw-r--r--drivers/mtd/nand/raw/nandsim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/nandsim.c b/drivers/mtd/nand/raw/nandsim.c
index 8511e70ca1e9..8ffd68321175 100644
--- a/drivers/mtd/nand/raw/nandsim.c
+++ b/drivers/mtd/nand/raw/nandsim.c
@@ -2366,7 +2366,7 @@ static int __init ns_init_module(void)
if (new_size >> overridesize != nsmtd->erasesize) {
NS_ERR("overridesize is too big\n");
ret = -EINVAL;
- goto err_exit;
+ goto cleanup_nand;
}
/* N.B. This relies on nand_scan not doing anything with the size before we change it */
@@ -2379,7 +2379,7 @@ static int __init ns_init_module(void)
ret = ns_setup_wear_reporting(nsmtd);
if (ret)
- goto err_exit;
+ goto cleanup_nand;
ret = ns_init(nsmtd);
if (ret)
@@ -2406,11 +2406,11 @@ static int __init ns_init_module(void)
unregister_mtd:
WARN_ON(mtd_device_unregister(nsmtd));
-err_exit:
free_ns_object:
ns_free(ns);
free_ebw:
kfree(erase_block_wear);
+cleanup_nand:
nand_cleanup(chip);
error:
kfree(ns);