Skip to content

Commit dc2733d

Browse files
committed
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 <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 5dcb516 commit dc2733d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/mtd/nand/raw/nandsim.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,7 +2366,7 @@ static int __init ns_init_module(void)
23662366
if (new_size >> overridesize != nsmtd->erasesize) {
23672367
NS_ERR("overridesize is too big\n");
23682368
ret = -EINVAL;
2369-
goto err_exit;
2369+
goto cleanup_nand;
23702370
}
23712371

23722372
/* 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)
23792379

23802380
ret = ns_setup_wear_reporting(nsmtd);
23812381
if (ret)
2382-
goto err_exit;
2382+
goto cleanup_nand;
23832383

23842384
ret = ns_init(nsmtd);
23852385
if (ret)
@@ -2406,11 +2406,11 @@ static int __init ns_init_module(void)
24062406

24072407
unregister_mtd:
24082408
WARN_ON(mtd_device_unregister(nsmtd));
2409-
err_exit:
24102409
free_ns_object:
24112410
ns_free(ns);
24122411
free_ebw:
24132412
kfree(erase_block_wear);
2413+
cleanup_nand:
24142414
nand_cleanup(chip);
24152415
error:
24162416
kfree(ns);

0 commit comments

Comments
 (0)