aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/loop.c3
-rw-r--r--drivers/block/z2ram.c4
-rw-r--r--drivers/md/dm.c4
-rw-r--r--drivers/s390/block/dcssblk.c7
-rw-r--r--drivers/sbus/char/jsflash.c3
5 files changed, 5 insertions, 16 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 06eaa11cbc2f..e425daa1eac3 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1568,8 +1568,7 @@ static void __exit loop_exit(void)
1568 loop_del_one(lo); 1568 loop_del_one(lo);
1569 1569
1570 blk_unregister_region(MKDEV(LOOP_MAJOR, 0), range); 1570 blk_unregister_region(MKDEV(LOOP_MAJOR, 0), range);
1571 if (unregister_blkdev(LOOP_MAJOR, "loop")) 1571 unregister_blkdev(LOOP_MAJOR, "loop");
1572 printk(KERN_WARNING "loop: cannot unregister blkdev\n");
1573} 1572}
1574 1573
1575module_init(loop_init); 1574module_init(loop_init);
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 2abf94cc3137..e40fa98842e5 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -371,9 +371,7 @@ static void __exit z2_exit(void)
371{ 371{
372 int i, j; 372 int i, j;
373 blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256); 373 blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256);
374 if ( unregister_blkdev( Z2RAM_MAJOR, DEVICE_NAME ) != 0 ) 374 unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME);
375 printk( KERN_ERR DEVICE_NAME ": unregister of device failed\n");
376
377 del_gendisk(z2ram_gendisk); 375 del_gendisk(z2ram_gendisk);
378 put_disk(z2ram_gendisk); 376 put_disk(z2ram_gendisk);
379 blk_cleanup_queue(z2_queue); 377 blk_cleanup_queue(z2_queue);
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index f4f7d35561ab..846614e676c6 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -161,9 +161,7 @@ static void local_exit(void)
161{ 161{
162 kmem_cache_destroy(_tio_cache); 162 kmem_cache_destroy(_tio_cache);
163 kmem_cache_destroy(_io_cache); 163 kmem_cache_destroy(_io_cache);
164 164 unregister_blkdev(_major, _name);
165 if (unregister_blkdev(_major, _name) < 0)
166 DMERR("unregister_blkdev failed");
167 165
168 _major = 0; 166 _major = 0;
169 167
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 1340451ea408..35765f6a86e0 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -747,14 +747,9 @@ dcssblk_check_params(void)
747static void __exit 747static void __exit
748dcssblk_exit(void) 748dcssblk_exit(void)
749{ 749{
750 int rc;
751
752 PRINT_DEBUG("DCSSBLOCK EXIT...\n"); 750 PRINT_DEBUG("DCSSBLOCK EXIT...\n");
753 s390_root_dev_unregister(dcssblk_root_dev); 751 s390_root_dev_unregister(dcssblk_root_dev);
754 rc = unregister_blkdev(dcssblk_major, DCSSBLK_NAME); 752 unregister_blkdev(dcssblk_major, DCSSBLK_NAME);
755 if (rc) {
756 PRINT_ERR("unregister_blkdev() failed!\n");
757 }
758 PRINT_DEBUG("...finished!\n"); 753 PRINT_DEBUG("...finished!\n");
759} 754}
760 755
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c
index 512857a23169..5157a2abc58d 100644
--- a/drivers/sbus/char/jsflash.c
+++ b/drivers/sbus/char/jsflash.c
@@ -619,8 +619,7 @@ static void __exit jsflash_cleanup_module(void)
619 jsf0.busy = 0; 619 jsf0.busy = 0;
620 620
621 misc_deregister(&jsf_dev); 621 misc_deregister(&jsf_dev);
622 if (unregister_blkdev(JSFD_MAJOR, "jsfd") != 0) 622 unregister_blkdev(JSFD_MAJOR, "jsfd");
623 printk("jsfd: cleanup_module failed\n");
624 blk_cleanup_queue(jsf_queue); 623 blk_cleanup_queue(jsf_queue);
625} 624}
626 625