Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343695
b: refs/heads/master
c: afd5e34
h: refs/heads/master
i:
  343693: 39f5d7e
  343691: 610c396
  343687: 66f1e54
  343679: ea9d287
v: v3
  • Loading branch information
Joel D. Diaz authored and James Bottomley committed Nov 27, 2012
1 parent a2a9697 commit 96f5ebc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 500c152afbafba2adcb23bb2e37b7138eb003b7f
refs/heads/master: afd5e34b2bb34881d3a789e62486814a49b47faa
13 changes: 8 additions & 5 deletions trunk/drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3116,10 +3116,6 @@ static int __init init_sd(void)
if (err)
goto err_out;

err = scsi_register_driver(&sd_template.gendrv);
if (err)
goto err_out_class;

sd_cdb_cache = kmem_cache_create("sd_ext_cdb", SD_EXT_CDB_SIZE,
0, 0, NULL);
if (!sd_cdb_cache) {
Expand All @@ -3133,8 +3129,15 @@ static int __init init_sd(void)
goto err_out_cache;
}

err = scsi_register_driver(&sd_template.gendrv);
if (err)
goto err_out_driver;

return 0;

err_out_driver:
mempool_destroy(sd_cdb_pool);

err_out_cache:
kmem_cache_destroy(sd_cdb_cache);

Expand All @@ -3157,10 +3160,10 @@ static void __exit exit_sd(void)

SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n"));

scsi_unregister_driver(&sd_template.gendrv);
mempool_destroy(sd_cdb_pool);
kmem_cache_destroy(sd_cdb_cache);

scsi_unregister_driver(&sd_template.gendrv);
class_unregister(&sd_disk_class);

for (i = 0; i < SD_MAJORS; i++)
Expand Down

0 comments on commit 96f5ebc

Please sign in to comment.