diff options
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 5325cf0ab197..a93308ae9736 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -4241,12 +4241,10 @@ static int __init init_st(void) | |||
4241 | do_create_driverfs_files(); | 4241 | do_create_driverfs_files(); |
4242 | return 0; | 4242 | return 0; |
4243 | } | 4243 | } |
4244 | if (st_sysfs_class) | ||
4245 | class_destroy(st_sysfs_class); | ||
4246 | unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0), | 4244 | unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0), |
4247 | |||
4248 | ST_MAX_TAPE_ENTRIES); | 4245 | ST_MAX_TAPE_ENTRIES); |
4249 | } | 4246 | } |
4247 | class_destroy(st_sysfs_class); | ||
4250 | 4248 | ||
4251 | printk(KERN_ERR "Unable to get major %d for SCSI tapes\n", SCSI_TAPE_MAJOR); | 4249 | printk(KERN_ERR "Unable to get major %d for SCSI tapes\n", SCSI_TAPE_MAJOR); |
4252 | return 1; | 4250 | return 1; |
@@ -4254,13 +4252,11 @@ static int __init init_st(void) | |||
4254 | 4252 | ||
4255 | static void __exit exit_st(void) | 4253 | static void __exit exit_st(void) |
4256 | { | 4254 | { |
4257 | if (st_sysfs_class) | ||
4258 | class_destroy(st_sysfs_class); | ||
4259 | st_sysfs_class = NULL; | ||
4260 | do_remove_driverfs_files(); | 4255 | do_remove_driverfs_files(); |
4261 | scsi_unregister_driver(&st_template.gendrv); | 4256 | scsi_unregister_driver(&st_template.gendrv); |
4262 | unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0), | 4257 | unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0), |
4263 | ST_MAX_TAPE_ENTRIES); | 4258 | ST_MAX_TAPE_ENTRIES); |
4259 | class_destroy(st_sysfs_class); | ||
4264 | kfree(scsi_tapes); | 4260 | kfree(scsi_tapes); |
4265 | printk(KERN_INFO "st: Unloaded.\n"); | 4261 | printk(KERN_INFO "st: Unloaded.\n"); |
4266 | } | 4262 | } |