File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2366,7 +2366,7 @@ static int __init ns_init_module(void)
2366
2366
if (new_size >> overridesize != nsmtd -> erasesize ) {
2367
2367
NS_ERR ("overridesize is too big\n" );
2368
2368
ret = - EINVAL ;
2369
- goto err_exit ;
2369
+ goto cleanup_nand ;
2370
2370
}
2371
2371
2372
2372
/* 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)
2379
2379
2380
2380
ret = ns_setup_wear_reporting (nsmtd );
2381
2381
if (ret )
2382
- goto err_exit ;
2382
+ goto cleanup_nand ;
2383
2383
2384
2384
ret = ns_init (nsmtd );
2385
2385
if (ret )
@@ -2406,11 +2406,11 @@ static int __init ns_init_module(void)
2406
2406
2407
2407
unregister_mtd :
2408
2408
WARN_ON (mtd_device_unregister (nsmtd ));
2409
- err_exit :
2410
2409
free_ns_object :
2411
2410
ns_free (ns );
2412
2411
free_ebw :
2413
2412
kfree (erase_block_wear );
2413
+ cleanup_nand :
2414
2414
nand_cleanup (chip );
2415
2415
error :
2416
2416
kfree (ns );
You can’t perform that action at this time.
0 commit comments