File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -447,18 +447,18 @@ int rds_rdma_init(void)
447
447
{
448
448
int ret ;
449
449
450
- ret = rds_rdma_listen_init ();
451
- if (ret )
452
- goto out ;
453
-
454
450
ret = rds_iw_init ();
455
451
if (ret )
456
- goto err_iw_init ;
452
+ goto out ;
457
453
458
454
ret = rds_ib_init ();
459
455
if (ret )
460
456
goto err_ib_init ;
461
457
458
+ ret = rds_rdma_listen_init ();
459
+ if (ret )
460
+ goto err_rdma_listen_init ;
461
+
462
462
if (!unload_allowed ) {
463
463
printk (KERN_NOTICE "Module %s locked in memory until next boot\n" ,
464
464
MODULE_NAME );
@@ -467,11 +467,18 @@ int rds_rdma_init(void)
467
467
468
468
goto out ;
469
469
470
+ err_rdma_listen_init :
471
+ /* We need to clean up both ib and iw components. */
472
+ rds_ib_exit ();
470
473
err_ib_init :
474
+ /* Only rds_iw_init() completes at this point, so we don't have to
475
+ * do anything with rds_ib_exit().
476
+ */
471
477
rds_iw_exit ();
472
- err_iw_init :
473
- rds_rdma_listen_stop ();
474
478
out :
479
+ /* Either nothing is done successfully or everything succeeds at
480
+ * this point.
481
+ */
475
482
return ret ;
476
483
}
477
484
module_init (rds_rdma_init );
You can’t perform that action at this time.
0 commit comments