Commit f82d82e2 authored by Miquel Raynal's avatar Miquel Raynal

mtd: rawnand: nandsim: Rename a label in ns_init_module()

Rename the "error" label to gave it a meaning.
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200525085851.17682-17-miquel.raynal@bootlin.com
parent 73f2b68c
...@@ -2310,7 +2310,7 @@ static int __init ns_init_module(void) ...@@ -2310,7 +2310,7 @@ static int __init ns_init_module(void)
default: default:
NS_ERR("bbt has to be 0..2\n"); NS_ERR("bbt has to be 0..2\n");
ret = -EINVAL; ret = -EINVAL;
goto error; goto free_ns_struct;
} }
/* /*
* Perform minimum nandsim structure initialization to handle * Perform minimum nandsim structure initialization to handle
...@@ -2337,7 +2337,7 @@ static int __init ns_init_module(void) ...@@ -2337,7 +2337,7 @@ static int __init ns_init_module(void)
ret = ns_parse_weakblocks(); ret = ns_parse_weakblocks();
if (ret) if (ret)
goto error; goto free_ns_struct;
ret = ns_parse_weakpages(); ret = ns_parse_weakpages();
if (ret) if (ret)
...@@ -2428,7 +2428,7 @@ static int __init ns_init_module(void) ...@@ -2428,7 +2428,7 @@ static int __init ns_init_module(void)
list_del(pos); list_del(pos);
kfree(list_entry(pos, struct weak_block, list)); kfree(list_entry(pos, struct weak_block, list));
} }
error: free_ns_struct:
kfree(ns); kfree(ns);
return ret; return ret;
......
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