mtd: rawnand: nandsim: Rename a label in ns_init_module()
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 25 May 2020 08:58:50 +0000 (10:58 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 31 May 2020 08:53:40 +0000 (10:53 +0200)
Rename the "error" label to gave it a meaning.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200525085851.17682-17-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/nandsim.c

index 4492b9a9962e193bc062d6faf387bfcee0921e14..7076acfbe0f44ff66447ab4d8ec0f7c49e4a6584 100644 (file)
@@ -2310,7 +2310,7 @@ static int __init ns_init_module(void)
        default:
                NS_ERR("bbt has to be 0..2\n");
                ret = -EINVAL;
-               goto error;
+               goto free_ns_struct;
        }
        /*
         * Perform minimum nandsim structure initialization to handle
@@ -2337,7 +2337,7 @@ static int __init ns_init_module(void)
 
        ret = ns_parse_weakblocks();
        if (ret)
-               goto error;
+               goto free_ns_struct;
 
        ret = ns_parse_weakpages();
        if (ret)
@@ -2428,7 +2428,7 @@ free_wb_list:
                list_del(pos);
                kfree(list_entry(pos, struct weak_block, list));
        }
-error:
+free_ns_struct:
        kfree(ns);
 
        return ret;