aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r--drivers/scsi/sr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index f9a52af7f5b4..5143c8990845 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -885,7 +885,11 @@ static int __init init_sr(void)
885 rc = register_blkdev(SCSI_CDROM_MAJOR, "sr"); 885 rc = register_blkdev(SCSI_CDROM_MAJOR, "sr");
886 if (rc) 886 if (rc)
887 return rc; 887 return rc;
888 return scsi_register_driver(&sr_template.gendrv); 888 rc = scsi_register_driver(&sr_template.gendrv);
889 if (rc)
890 unregister_blkdev(SCSI_CDROM_MAJOR, "sr");
891
892 return rc;
889} 893}
890 894
891static void __exit exit_sr(void) 895static void __exit exit_sr(void)