File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2387,16 +2387,16 @@ static int __init ns_init_module(void)
2387
2387
2388
2388
ret = nand_create_bbt (chip );
2389
2389
if (ret )
2390
- goto err_exit ;
2390
+ goto free_ns_object ;
2391
2391
2392
2392
ret = ns_parse_badblocks (ns , nsmtd );
2393
2393
if (ret )
2394
- goto err_exit ;
2394
+ goto free_ns_object ;
2395
2395
2396
2396
/* Register NAND partitions */
2397
2397
ret = mtd_device_register (nsmtd , & ns -> partitions [0 ], ns -> nbparts );
2398
2398
if (ret )
2399
- goto err_exit ;
2399
+ goto free_ns_object ;
2400
2400
2401
2401
ret = ns_debugfs_create (ns );
2402
2402
if (ret )
@@ -2407,6 +2407,7 @@ static int __init ns_init_module(void)
2407
2407
unregister_mtd :
2408
2408
WARN_ON (mtd_device_unregister (nsmtd ));
2409
2409
err_exit :
2410
+ free_ns_object :
2410
2411
ns_free (ns );
2411
2412
nand_cleanup (chip );
2412
2413
error :
You can’t perform that action at this time.
0 commit comments